Ejemplo n.º 1
0
    IEnumerator ElectricityActive()
    {
        //do some blinking

        yield return(new WaitForSeconds(2f));

        //stop blinking

        state         = ElectricState.ELECTRIC;
        agent.enabled = true;

        electricGraphic.SetActive(true);

        yield return(new WaitForSeconds(3f));

        electricGraphic.SetActive(false);

        state          = ElectricState.NORMAL;
        agent.enabled  = false;
        stateCountdown = timeBetweenState;
    }
Ejemplo n.º 2
0
 public void electrocute()
 {
     myState = new ElectricState(this);
 }