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); }
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--; }
public IEnumerator TurnTo(TileHolder targetHolder, float duration) { yield return(visualRoot.DOLookAt(targetHolder.transform.position, duration, AxisConstraint.Y).WaitForCompletion()); }
public override void Init(Tower obj, TileHolder tileHolder) { base.Init(obj, tileHolder); GridObject.OnDie += OnDie; GridObject.OnHealthChanged += OnHealthChanged; }