Exemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        for (int i = 1; i <= 3; i++)
        {
            if (Input.GetKeyDown(i.ToString()))
            {
                State = (ENPCState)i;
            }
        }

        switch (State)
        {
        case ENPCState.IDLE:
            DoIdleStuff();
            break;

        case ENPCState.FOLLOW:
            DoFollowStuff();
            break;

        default:
            break;
        }
    }
Exemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     State = ENPCState.IDLE;
 }