// Use this for initialization
 void Start()
 {
     if (transform.position.y < 2.5f){
         Vector3 pos = transform.position;
         pos.y = 2.5f;
         transform.position = pos;
     }
     mCameraType = cameraType_t.BUILDVIEW;
     //SwitchMode();
 }
Beispiel #2
0
 // Use this for initialization
 void Start()
 {
     if (transform.position.y < 2.5f)
     {
         Vector3 pos = transform.position;
         pos.y = 2.5f;
         transform.position = pos;
     }
     mCameraType = cameraType_t.BUILDVIEW;
     //SwitchMode();
 }
 public void SwitchMode()
 {
     if (mCameraType == cameraType_t.BUILDVIEW){
         mCameraType = cameraType_t.PLAYERVIEW;
     }
     else{
         mCameraType = cameraType_t.BUILDVIEW;
     }
     switch (mCameraType){
     case cameraType_t.BUILDVIEW:
         Vector3 buildRot = new Vector3(90,0,0);
         this.transform.eulerAngles = buildRot;
         break;
     case cameraType_t.PLAYERVIEW:
         Vector3 playerRot = new Vector3(30,45,0);
         this.transform.eulerAngles = playerRot;
         break;
     }
 }
Beispiel #4
0
    public void SwitchMode()
    {
        if (mCameraType == cameraType_t.BUILDVIEW)
        {
            mCameraType = cameraType_t.PLAYERVIEW;
        }
        else
        {
            mCameraType = cameraType_t.BUILDVIEW;
        }
        switch (mCameraType)
        {
        case cameraType_t.BUILDVIEW:
            Vector3 buildRot = new Vector3(90, 0, 0);
            this.transform.eulerAngles = buildRot;
            break;

        case cameraType_t.PLAYERVIEW:
            Vector3 playerRot = new Vector3(30, 45, 0);
            this.transform.eulerAngles = playerRot;
            break;
        }
    }