RemoveCandyCorn() public method

public RemoveCandyCorn ( int candyCorn ) : void
candyCorn int
return void
Exemplo n.º 1
0
 private void OnRemoveCandiesPressed()
 {
     if (CandyCornManager.GetTotalCandyCorn() >= 5)
     {
         CandyCornManager.RemoveCandyCorn(ADDCANDIES);
     }
 }
Exemplo n.º 2
0
    // called by the TargetSelector once it has selected targets
    public void SetTargetedCombatants(GameObject[] targetedCombatants)
    {
        CandyCornManager.RemoveCandyCorn(CandyCornCost);

        Debug.Log($"Ability about to continue! Got {targetedCombatants.Length} {targetedCombatants.GetType()}");
        TargetedCombatants = targetedCombatants;
        Debug.Log($"Should be targetting {TargetedCombatants[0].GetType()}");

        if (TargetedCombatants[0].TryGetComponent(out EnemyCombatant e)) // Kinda heavy on performance, but I am not sure how to check the class without getting the component
        {
            FaceEnemyInCombat();
        }

        ContinueAbilityAfterTargeting();
    }