public void Perform() { Vector2 screenPosition = positionVerctor2Mapper.PositionToScreenPoint(targetPosition); float time = characterView.PlayMove(); characterView.Look(direction); characterView.Move(screenPosition, time); characterView.Moved += CharacterViewMoved; }
public void Perform() { attackerView.Look(attacker.Position.GetDirectionTo(attackee.Position)); attackeeView.Look(attackee.Position.GetDirectionTo(attacker.Position)); attackee.ApplyDamage(attacker.Damage); float attackDuration = attackerView.PlayAttack(); float reactionDuration = attackee.Hp > 0 ? attackeeView.PlayHurt() : attackeeView.PlayDie(); timeRest = Mathf.Max(attackDuration, reactionDuration); tickableManager.Add(this); }