Exemplo n.º 1
0
    public void Rocking(UIRocker.Direction direction)
    {
        if (animator == null)
        {
            return;
        }
        switch (direction)
        {
        case UIRocker.Direction.Up:
            animator.Play("walk");
            break;

        case UIRocker.Direction.Down:
            animator.Play("idle");
            break;

        case UIRocker.Direction.Left:
            go.transform.localEulerAngles = Vector3.zero;
            break;

        case UIRocker.Direction.Right:
            go.transform.localEulerAngles = new Vector3(0, 180, 0);
            break;
        }
    }
Exemplo n.º 2
0
 void Rock(RolePage role, UIRocker.Direction direction)
 {
     role.Rocking(direction);
 }