Beispiel #1
0
 // stops all coroutines and reset the plant state
 private void StopFireAndResetState(Stats.PlantState plantState, Color color)
 {
     if (burnCoroutine != null)
     {
         StopCoroutine(burnCoroutine);
     }
     if (spreadFireCoroutine != null)
     {
         StopCoroutine(spreadFireCoroutine);
     }
     ChangePlantState(color, plantState);
 }
Beispiel #2
0
 // reset plant to certain state and coresponding color
 private void ChangePlantState(Color newColor, Stats.PlantState newState)
 {
     GetComponent <Renderer>().material.color = newColor;
     plantState = newState;
 }