Esempio n. 1
0
        private void OnBoxMoveEnd(MoveableUnit unit)
        {
            unit.onMoveEnd -= OnBoxMoveEnd;

            if (_lv.IsTarget((ushort)unit.Tile.x, (ushort)unit.Tile.y))
            {
                (unit as BoxUnit).SetIsAtTarget(true);
                //播放一个效果
                ViewFactory.Create <BangEffect>("hot_res/prefabs/game", "BangEffect", unit.gameObject.transform);
                CheckLevelComplete();
            }
            else
            {
                (unit as BoxUnit).SetIsAtTarget(false);
            }
        }
Esempio n. 2
0
 private void OnMoveEnd(MoveableUnit unit)
 {
     _animator.SetBool("Move", false);
     _as.Stop();
 }
Esempio n. 3
0
 private void OnMoveStart(MoveableUnit unit)
 {
     SetToward(MoveDir);
     _animator.SetBool("Move", true);
     _as.Play();
 }
Esempio n. 4
0
 private void OnRoleMoveEnd(MoveableUnit obj)
 {
     MoveRole(_lastMove);
 }
Esempio n. 5
0
 private void OnMoveStart(MoveableUnit obj)
 {
     Global.Ins.effectDevice.Play(ResMgr.Ins.Load <AudioClip>("hot_res/audios/push"));
 }