// Use this for initialization
 void Start()
 {
     if (sceneController == null)
     {
         sceneController = GameObject.Find("MasterSceneController").GetComponent <SceneControllerScript>();
     }
 }
Exemple #2
0
 // Start is called before the first frame update
 void Start()
 {
     units = GameObject.FindGameObjectsWithTag("Unit");
     boxes = GameObject.FindGameObjectsWithTag("Box");
     Debug.Log("boxes are " + boxes);
     commandsQueue.Enqueue(new List <Command>());
     commandsQueue.Enqueue(new List <Command>());
     commandsQueue.Enqueue(new List <Command>());
     commandsQueue.Enqueue(new List <Command>());
     //initialise
     endTurnButton   = GameObject.Find("End turn button");
     sceneController = GameObject.FindGameObjectWithTag("SceneController").GetComponent <SceneControllerScript>();
 }
Exemple #3
0
    void Awake()
    {
        filteredDockingObject = GameObject.Find("FilteredDockingObject");

        arduinoControllerObject = GameObject.FindGameObjectWithTag("ArduinoController");
        arduinoController       = arduinoControllerObject.GetComponent <ArduinoController>();

        dockingObject = GameObject.FindGameObjectWithTag("DockingCircle");
        //GameObject.Find("ReferenceCircle").GetComponent<Image>().sprite = Resources.Load<Sprite>("Images/Pie" + pieMenuSize);
        // xRan = Mathf.Cos(angle) * radius;
        // yRan = Mathf.Sin(angle) * radius;

        pieMenuDisplay = GameObject.Find("ReferenceCircle").GetComponent <Image>();
        // targetCircle.transform.position = new Vector3(xRan + dockingCircle.transform.position.x, yRan + dockingCircle.transform.position.y, 0.0f);

        SceneControllerObject = GameObject.FindGameObjectWithTag("SceneController");
        sceneController       = SceneControllerObject.GetComponent <SceneControllerScript>();

        width  = (float)Screen.width / 2.0f;
        height = (float)Screen.height / 2.0f;
        // Position used for the cube.
        position = new Vector3(0.0f, 0.0f, 0.0f);
    }
Exemple #4
0
 // Start is called before the first frame update
 void Start()
 {
     SharedInstance = this;
 }