Ejemplo n.º 1
0
    public void ChangeState(MascotState newState)
    {
        currentState = newState;
        switch (newState)
        {
        case MascotState.STATE_NORMAL:
            gameObject.GetComponent <Image>().sprite = sprites[0];
            break;

        case MascotState.STATE_ANGRY:
            gameObject.GetComponent <Image>().sprite = sprites[1];
            break;

        case MascotState.STATE_SLEEP:
            gameObject.GetComponent <Image>().sprite = sprites[2];
            break;
        }
    }
Ejemplo n.º 2
0
 public Transfer(MascotState nextState)
 {
     NextState = nextState;
 }
Ejemplo n.º 3
0
 void Start()
 {
     currentState = MascotState.STATE_NORMAL;
     gameObject.GetComponent <Image>().sprite = sprites[0];
     tutorial = GameObject.Find("Tutorial").GetComponent <Tutorial>();
 }