コード例 #1
0
    void facePosition()
    {
        if (isInitialised == false || PoliceController.me.currentRoomSwat == null)
        {
            return;
        }

        if (pos == Vector3.zero)
        {
            if (PoliceController.me.buildingUnderSiege == null)
            {
                pos = this.transform.position + this.transform.forward;
            }
            else
            {
                roomRect r = PoliceController.me.currentRoomSwat.getRectIAmIn(this.transform.position);
                if (r == null)
                {
                    pos = PoliceController.me.currentRoomSwat.getCenter();
                }
                else
                {
                    pos = r.getCenterPoint();
                }
            }
        }
        myController.pmc.rotateToFacePosition(pos);
    }
コード例 #2
0
 void facePosition()
 {
     if (pos == Vector3.zero)
     {
         if (PoliceController.me.currentRoomSwat == null)
         {
             pos = CommonObjectsStore.player.transform.position;
         }
         else
         {
             roomRect r = PoliceController.me.currentRoomSwat.getRectIAmIn(this.transform.position);
             if (r == null)
             {
                 pos = PoliceController.me.currentRoomSwat.getCenter();
             }
             else
             {
                 pos = r.getCenterPoint();
             }
         }
     }
     myController.pmc.rotateToFacePosition(pos);
 }