예제 #1
0
        private float GetRotation()
        {
            float z = 0f;

            switch (OwnerMobileBehaviour.GetLastDirectionIndex())
            {
            case 0:
                //Debug.Log("asd");
                z = -90f;
                break;

            case 1:
                z = 0f;
                break;

            case 2:
                z = 90f;
                break;

            case 3:
                z = 180f;
                break;
            }

            return(z);
        }
 public void TrySkillGain()
 {
     if (OwnerMobileBehaviour.tag == "Player")
     {
         var props = OwnerMobileBehaviour.GetComponent <PropsBehaviour>();
         props.Melee.Gain(0.1f);
     }
 }
예제 #3
0
        private Vector2 GetDirection()
        {
            switch (OwnerMobileBehaviour.GetLastDirectionIndex())
            {
            case 0:
                return(Vector2.right);

            case 1:
                return(Vector2.up);

            case 2:
                return(Vector2.left);

            case 3:
                return(Vector2.down);
            }
            return(Vector2.right);
        }