Example #1
0
 public void AttackRange(IHeroAttack type, float shootAngle, Action onCompletedCallback)
 {
     _onCompletedAttackCallback = onCompletedCallback;
     _animatorController.Attack(type.Type, () =>
     {
         ShootBullet(shootAngle);
         _onCompletedAttackCallback?.Invoke();
     });
 }
Example #2
0
 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);
 }
Example #3
0
 public void AttackMelee(IHeroAttack type, Action onCompletedCallback)
 {
     _onCompletedAttackCallback = onCompletedCallback;
     _meleeCollider.enabled     = true;
     _animatorController.Attack(type.Type, DamageEnemy);
 }