性的设置,如果isListener值为真,则改变旋转值会触发R_CHANGE的事件
Direction类源代码:
CODE:
package index.base.game{ import flash.events.EventDispatcher; import flash.events.KeyboardEvent; import flash.events.Event; import flash.display.InteractiveObject; import index.base.events.DirectionEvent; public class Direction extends EventDispatcher{ //方向表示 public static const UP:uint = 0; public static const DOWN:uint = 1; public static const LEFT:uint = 2; public static const RIGHT:uint = 3; //作用区域 public var area:InteractiveObject; //是否单向 public var sole:Boolean; //上下左右键值 private const directionAr:Array = new Array(4); //是否上下左右 private var _up:Boolean = false; private var _down:Boolean = false; &nbs
|