Ejemplo n.º 1
0
    public void Walk(Dictionary <string, object> input)
    {
        Vector3 mouseCoordinates = (Vector3)input["Axis"];
        string  state            = (string)input["State"];

        if (state == "Hold" && mouseCoordinates.y > 0.13)
        {
            //rotation
            float r = classTrashCan.transform.parent.rotation.eulerAngles.z;
            //Right
            if (mouseCoordinates.x > 0.5 && r > 200)
            {
                FacadeTrashCan.Walk(classTrashCan, 1);
            }
            //Left
            else if (mouseCoordinates.x < 0.5 && r < 340)
            {
                FacadeTrashCan.Walk(classTrashCan, -1);
            }
            else
            {
                FacadeTrashCan.Idle(classTrashCan);
            }
        }
        else
        {
            FacadeTrashCan.Idle(classTrashCan);
        }
    }
Ejemplo n.º 2
0
 public void Hurt()
 {
     FacadeTrashCan.Hurt(classTrashCan);
     if (classTrashCan.life <= 0)
     {
         scriptGame.GameOver();
     }
 }
Ejemplo n.º 3
0
    public void Point()
    {
        FacadeTrashCan.Score(classTrashCan);

        BehaviourAnimation.Float(earth, "Life", classTrashCan.life);
    }