예제 #1
0
 // Use this for initialization
 void Start()
 {
     clickedobject = this.GetComponent <Clicked> ();
     gl            = GameObject.Find("ScriptGlobal").GetComponent <Global> ();
     pa            = this.GetComponent <PlayAnimations> ();
     ins           = this.GetComponent <InventorySystem> ();
     zio           = this.GetComponent <ZoomInOut> ();
     dt            = this.GetComponent <DragTurn> ();
     if (go == null)
     {
         go = this.gameObject;
     }
 }
예제 #2
0
파일: Global.cs 프로젝트: ezecoen/Within
 public void ClearTurnFlags()
 {
     GameObject[] gameobjs = GetAllGameObjectsChilds(GameObject.Find("ScriptGlobal")).ToArray();
     foreach (GameObject go in gameobjs)
     {
         try {
             DragTurn DT = go.GetComponent <DragTurn>();
             if (DT.isRotating || DT.mayRotate || DT.timer != -1)
             {
                 Debug.Log("A Turn Flag was Cleared.");
             }
             DT.isRotating = false;
             DT.mayRotate  = false;
             DT.timer      = -1;
         } catch {}
     }
 }