Beispiel #1
0
    protected override void OnEnable()
    {
        base.OnEnable();
        Health = healthMax;

        BulletHitBehaviour = new DamagePlayerBehaviour(this);
    }
Beispiel #2
0
    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();
    }
Beispiel #3
0
 public void ChangeBulletHitBehaviour(IBulletHitBehaviour newBulletHitBehaviour)
 {
     BulletHitBehaviour = newBulletHitBehaviour;
 }