Ejemplo n.º 1
0
    protected override void OnEnable()
    {
        base.OnEnable();
        Health = healthMax;

        BulletHitBehaviour = new DamagePlayerBehaviour(this);
    }
Ejemplo n.º 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();
    }
Ejemplo n.º 3
0
 public void ChangeBulletHitBehaviour(IBulletHitBehaviour newBulletHitBehaviour)
 {
     BulletHitBehaviour = newBulletHitBehaviour;
 }