Example #1
0
    // When Pacman eats a big dot:
    public void EatBigDot()
    {
        // then change the state machine of ghosts and pacman and whatever.
        // start a timer for however long it goes
        bigDotTimer = 10; // if it's less than 3 then ghosts flash, if it's zero then they stop flashing and go back to regular combat

        if (system.enableFSMControl)
        {
            system.Transition(4); // change it to the deathstate
        }
        else
        {
            foreach (GameObject ghost in ghostList)
            {
                IndividualFSMSystem s = ghost.GetComponent <IndividualFSMSystem>();
                s.Transition("FleeState");
            }
        }

        deathstate.BigDotTrigger();
    }