protected override void OnEnable() { base.OnEnable(); Health = healthMax; BulletHitBehaviour = new DamagePlayerBehaviour(this); }
private void OnEnable() { GameManager.OnTenSecondsPassed += RefreshEnergy; AbsorbBullets.OnAbsorbBulletsCardActivated += EnlargeHitbox; AbilityManager.OnAbsorbBulletsCardDeactivated += ShrinkHitbox; BlockBullets.OnBlockBulletsCardActivated += EnlargeHitbox; AbilityManager.OnBlockBulletsCardDeactivated += ShrinkHitbox; AbilityManager.OnPlayerWeaponCardDeactivated += SetPeaShooter; BulletHitBehaviour = new DamagePlayerBehaviour(this); BlockBullets.OnBlockBulletsCardActivated += collisionCheck.GainInvincibility; AbsorbBullets.OnAbsorbBulletsCardActivated += collisionCheck.GainInvincibility; AbilityManager.OnBlockBulletsCardDeactivated += collisionCheck.LoseInvincibility; AbilityManager.OnAbsorbBulletsCardDeactivated += collisionCheck.LoseInvincibility; Health = healthMax; Energy = energyMax; /*if (!debugWeapons) * Spawner.Pattern = null;*/ SetPeaShooter(); }
public void ChangeBulletHitBehaviour(IBulletHitBehaviour newBulletHitBehaviour) { BulletHitBehaviour = newBulletHitBehaviour; }