Discuz! Board

 

 

Search
Discuz! Board Forum Integration Questions how to use the function "node.bitmap(callback, param ...
Author: yimi0815
go

how to use the function "node.bitmap(callback, param)"

Rank: 2

Post on 2011-12-5 14:22 |All posts
请问如何改变一个图片的亮度?我是这样该的:

c=node.color();
                grey = m_color(c[0],0,0,0,20, 0,c[1],0,0,20, 0,0,c[2],0,20, 0,0,0,100,0) ;
                node.texture("ui/13.png", grey);
是这样用吗?
感觉没有看到什么效果啊?

Rank: 4

Post on 2011-12-9 17:04 |All posts
变亮就是r,g,b值变大吧,r,g,b都0是黑,rgb都1是白。不一定要用m_color, 直接设rgb的数值也可。

m_color用法是:
参数是20个数
[ a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t ]

         如果原图颜色是R,G,B,A,  新颜色是
    r = a*R + b*G + c*B + d*A + e;
    g = f*R + g*G + h*B + i*A + j;
    b = k*R + l*G + m*B + n*A + o;
    a = p*R + q*G + r*B + s*A + t;

Rank: 2

Post on 2011-12-16 10:29 |All posts
我如果把一个结点从父节点remove,那么这个结点所占有的资源会什么时候被清空呢?
如果想把这个结点所占资源完全释放掉,我先把它从父节点删除,再node=null,可以达到这个效果吗?

Rank: 4

Post on 2011-12-16 13:49 |All posts
垃圾回收自动清空。

可以达到

Rank: 2

Post on 2011-12-16 14:26 |All posts
好的,谢谢

Rank: 2

Post on 2012-1-6 15:46 |All posts
可以在游戏中打开网页吗

Rank: 2

Post on 2012-1-6 15:50 |All posts
问题解决

Rank: 2

Post on 2012-1-10 14:47 |All posts
你好,我看到一些游戏的欢迎页面并不是常规的“进入游戏”“更多游戏”的显示方式,而是另外一种形式,请问另一种方式是怎么实现的?有相应的例子吗?

Rank: 2

Post on 2012-1-10 16:31 |All posts
我修改了static_gameengine.zh_CN.html文件,希望加一个按钮,点击这个按钮可以打开一个网页,我这样设置了<p style="margin-top: 12px;"><a href="https://www.google.com"><img src="papaya_cache_file://../images/test.png"></a></p>,可是无法打开此链接,请问如何添加类似的事件呢?

Rank: 2

Post on 2012-1-10 17:07 |All posts
我如何调用static_game.zh_CN.html,而不是调用static_gameengine.zh_CN.html,这个在哪里配置?
Security Q&A Change Security code Change

Archiver|Comsenz Inc.

All time is GMT+8, 2013-5-23 05:31 , Processed in 0.036048 second(s), 9 queries .

Powered by Discuz! X1.5

© 2001-2010 Comsenz Inc.