public void AttackRange(IHeroAttack type, float shootAngle, Action onCompletedCallback) { _onCompletedAttackCallback = onCompletedCallback; _animatorController.Attack(type.Type, () => { ShootBullet(shootAngle); _onCompletedAttackCallback?.Invoke(); }); }
public Hero(int instanceId, HeroStatsConfig stats) { InstanceId = instanceId; Team = stats.Team; HealthPoints = new HealthPoints(stats.HealthPoints); MaxMovementForce = stats.MaxMovementForce; Attack = AttackFactory.GetAttack(stats.AttackConfig); Ability = AbilityFactory.GetAbility(stats.AbilityConfig); }
public void AttackMelee(IHeroAttack type, Action onCompletedCallback) { _onCompletedAttackCallback = onCompletedCallback; _meleeCollider.enabled = true; _animatorController.Attack(type.Type, DamageEnemy); }