示例#1
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.name == "Player")
     {
         realRoom.GetComponent <Transform>().position = GeneralVector3.RotateCounterClockwise(GeneralVector3.Vector3NoHeight(player.position), realRoom.GetComponent <Transform>().position, resetAngle);
     }
 }
示例#2
0
    private DataRecord.WayPointsReal[] RotateWayPoints(Vector3 playerPos, DataRecord.WayPointsReal[] rotateWayPoint, float angle)
    {
        int length = rotateWayPoint.Length;

        DataRecord.WayPointsReal[] newWayPoints = new DataRecord.WayPointsReal[length];
        for (int i = 0; i < length; ++i)
        {
            newWayPoints[i].realPosition = GeneralVector3.RotateCounterClockwise(playerPos, rotateWayPoint[i].realPosition, angle);
            newWayPoints[i].turnType     = rotateWayPoint[i].turnType;
        }
        return(newWayPoints);
    }