예제 #1
0
    // Update is called once per frame
    void Update()
    {
        float cur_angle = transform.rotation.eulerAngles.y;

//		upAngle.setCurrentAngle(cur_angle);
        rightAngle.setCurrentAngle(cur_angle);

//		getHitGameObject(rightAngle);
    }
예제 #2
0
    void setAngleToRight(AngleUnit in_angleUnit)
    {
        float new_angle = in_angleUnit.getCurrentAngleBase() + 90;

        if (new_angle > 360)
        {
            new_angle %= 360;
        }
        in_angleUnit.setCurrentAngle(new_angle);
    }
예제 #3
0
    void setAngleToLeft(AngleUnit in_angleUnit)
    {
        float new_angle = in_angleUnit.getCurrentAngleBase() - 90;

        if (new_angle > 360)
        {
            new_angle %= 360;
        }
        if (new_angle < 0)
        {
            new_angle += 360;
        }
        in_angleUnit.setCurrentAngle(new_angle);
    }