Fixes? and side channels.
This commit is contained in:
@ -7,7 +7,7 @@ public class AimAssistant : MonoBehaviour
|
||||
[HideInInspector] public GameObject enemy;
|
||||
private Shooting _shooting;
|
||||
public bool isFiring = false;
|
||||
private ICharacter _myNpc;
|
||||
private NPC _myNpc;
|
||||
[SerializeField] private float lookSpeed = 400f;
|
||||
private Transform _myTransform;
|
||||
private float _fireCountdown;
|
||||
@ -39,7 +39,11 @@ public class AimAssistant : MonoBehaviour
|
||||
{
|
||||
enemy = enemies[new System.Random().Next(enemies.Count)];
|
||||
var character = enemy.GetComponent<ICharacter>();
|
||||
character.OnDeathEvent += _ => isFiring = false;
|
||||
character.OnDeathEvent += _ =>
|
||||
{
|
||||
isFiring = false;
|
||||
_myNpc.AddReward(0.2f);
|
||||
};
|
||||
isFiring = true;
|
||||
}
|
||||
}
|
||||
@ -88,7 +92,7 @@ public class AimAssistant : MonoBehaviour
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
_shooting.Shoot();
|
||||
_shooting.BotShoot();
|
||||
yield return new WaitForSeconds(_fireCountdown);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user