Exemple #1
0
    private void HandleParasite(Player _player)
    {
        player = _player;
        PlatformManager.OnParasite(this);

        anim.SetTrigger("Parasite");

        toleranceCtrl.Setup();
        player.OnPlayerMaxHealth += HandlePlayerMaxHealth;

        graphics.ChangeTexture(TextureType.Parasite);

        rotationBehaviour.enabled = false;
        launchDirection           = transform.right;

        idleCommandsCtrl.ToggleButton(false);
        parasiteCommandCtrl.ToggleButton(true);

        tickCoroutine = StartCoroutine(Tick());
    }
Exemple #2
0
 public override void Enter()
 {
     uiManager      = context.UIManager;
     tolleranceCtrl = context.enemy.GetToleranceCtrl();
     tolleranceCtrl.Setup();
     uiManager.GetGamePanel().SetMaxToleranceValue(tolleranceCtrl.GetMaxTolerance());
     uiManager.GetGamePanel().EnableToleranceBar(true);
     context.enemy.SetCanStun(false);
     context.enemy.SetCanTakeDamage(false);
     context.enemy.GetGraphics().ChangeTexture(TextureType.Parasite);
     context.player.OnPlayerMaxHealth += HandlePlayerMaxHealth;
     context.enemy.GetEnemyCommandsSpriteController().SetParasiteState(true);
     if (context.player.gameObject.layer == LayerMask.NameToLayer("Player"))
     {
         context.player.OnDamageableCollision += HandlePlayerDamageableCollision;
         context.player.OnEnemyCollision      += HandlePlayerEnemyCollision;
         immunity = false;
     }
     else
     {
         context.player.OnPlayerImmunityEnd += HandlePlayerImmunityEnd;
         immunity = true;
     }
 }