Esempio n. 1
0
 public void ChangeView()
 {
     currentView = (EnumScript.View)(((int)currentView) + 1);
     if ((int)currentView >= Enum.GetNames(typeof(EnumScript.View)).Length)
     {
         currentView = (EnumScript.View)ConstantScript.initial;
     }
     txtChangeView.text = ConstantScript.changeViewString + currentView;
     SwitchCamera(currentView);
 }
Esempio n. 2
0
 private void Awake()
 {
     treeList           = new List <TreeData>();
     currentTree        = (EnumScript.Tree)ConstantScript.initial;
     currentView        = (EnumScript.View)ConstantScript.initial;
     activeState        = (EnumScript.State)ConstantScript.initial;
     treeId             = ConstantScript.initial;
     numberOfNormalTree = numberOfAppleTree = numberOfOrangeTree = ConstantScript.initial;
     letTreeMove        = false;
     isSave             = false;
     SwitchCamera(currentView);
     ShowPopupWindow(false);
     UpdateInformation();
 }
Esempio n. 3
0
    private void SwitchCamera(EnumScript.View cameraView)
    {
        switch (cameraView)
        {
        case EnumScript.View.Top:
            topCamera.enabled   = true;
            frontCamera.enabled = false;
            sideCamera.enabled  = false;
            break;

        case EnumScript.View.Front:
            topCamera.enabled   = false;
            frontCamera.enabled = true;
            sideCamera.enabled  = false;
            break;

        case EnumScript.View.Side:
            topCamera.enabled   = false;
            frontCamera.enabled = false;
            sideCamera.enabled  = true;
            break;
        }
    }