// private Animation playerAnimation; void Awake() { // playerAnimation = GetComponent<Animation>(); // playerAnimation["wait"].blendMode = AnimationBlendMode.Blend; instance = this; selfTransform = this.transform; moveStart = OnMoveStart; moveEnd = OnMoveEnd; guiJoystackController = JoytackController.instance; }
void Awake() { context = new GameContext(); guiJoystackController = JoytackController.instance; GlobalClient.AddEventReceiver(EventType.EVT_MOUSE_FIRE1, context); GlobalClient.AddEventReceiver(EventType.EVT_MOUSE_FIRE2, context); context.MouseFire1Handler += OnMouseFire1; context.MouseFire2Handler += OnMouseFire2; moveStart = OnMoveStart; moveEnd = OnMoveEnd; }
void Awake() { instance = this; #region 添加操作响应函数 //1.拖拽开始响应函数 EventTriggrListener.GetEventTriggerListener(gameObject).OnDragDelegate = OnDragDelegate; //2.拖拽结束响应函数 EventTriggrListener.GetEventTriggerListener(gameObject).OnDragEndDelegate = OnDragEndDelegate; //3.触摸按钮响应函数 EventTriggrListener.GetEventTriggerListener(gameObject).OnPointDownDelegate = OnPointerDownDelegate; #endregion }