开发者

Can I pass null as an argument to as3 signals?

I have a signal like this:

public var e_collision:Signal = new Signal(GameObj);

When the object collides with another, I pass the other object as the argument.

But if the object collides with a wall, the wall is not a GameObj开发者_开发技巧, I would like to know, can I pass null instead?


Why not?

http://www.peterelst.com/blog/2010/01/22/as3-signals-the-best-thing-since-sliced-bread/


I finally had time to test, result: I can pass null as an argument.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜