예제 #1
0
        public IEnumerator Move(TileHolder tile, float jumpPower, float duration)
        {
            TileHolder = tile;
            yield return(transform.DOJump(GetPlacementPosition(tile), jumpPower, 1, duration).WaitForCompletion());

            GridObject.Move(tile.Tile);
        }
예제 #2
0
        public IEnumerator Attack(TileHolder tile, Vector3 offset, float duration, float power, float elasticity,
                                  int vibrato)
        {
            GameManager.Instance.AudioManager.PlayEnemyAttack();
            yield return(transform.DOPunchPosition((GetPlacementPosition(tile) + offset - transform.position) * power,
                                                   duration, vibrato, elasticity).WaitForCompletion());

            tile.Tile.Height--;
        }
예제 #3
0
 public IEnumerator TurnTo(TileHolder targetHolder, float duration)
 {
     yield return(visualRoot.DOLookAt(targetHolder.transform.position, duration, AxisConstraint.Y).WaitForCompletion());
 }
예제 #4
0
 public override void Init(Tower obj, TileHolder tileHolder)
 {
     base.Init(obj, tileHolder);
     GridObject.OnDie           += OnDie;
     GridObject.OnHealthChanged += OnHealthChanged;
 }