示例#1
0
 private void InvertDirection()
 {
     direction += 2;
     if ((int)direction >= 4)
     {
         direction -= 4;
     }
     skipTurn = 3;
 }
示例#2
0
    public void ThrowSword(Player.PlayerDirection p_direction)
    {
        direction = new Vector3(Mathf.Sin((int)p_direction * -90f * Mathf.Deg2Rad),
                                0f, Mathf.Cos((int)p_direction * 90f * Mathf.Deg2Rad));

        swordGO.transform.parent        = swordsContainer.transform;
        swordGO.transform.localRotation = Quaternion.identity;
        swordGO.transform.localScale    = Vector3.one;
        swordState            = SwordState.MOVING;
        swordCollider.enabled = true;
    }