コード例 #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;
 }