Esempio n. 1
0
 // Use this for initialization
 void Start()
 {
     phaseManager = GameObject.Find("Player").GetComponent<PhaseScript>();
     player = GameObject.Find("Player").GetComponent<Transform>();
     /*bombText = Instantiate (Resources.Load ("BombText"), transform.position, Quaternion.identity) as GameObject;
     bombText.transform.SetParent (GameObject.Find ("BombCanvas").transform);
     Vector2 screenPoint = RectTransformUtility.WorldToScreenPoint (Camera.main, transform.position);
     bombText.GetComponent<RectTransform>().anchoredPosition = screenPoint;*/
 }
Esempio n. 2
0
    // Use this for initialization
    void Start()
    {
        phaseManager = GameObject.Find("Player").GetComponent <PhaseScript>();
        player       = GameObject.Find("Player").GetComponent <Transform>();

        /*bombText = Instantiate (Resources.Load ("BombText"), transform.position, Quaternion.identity) as GameObject;
         * bombText.transform.SetParent (GameObject.Find ("BombCanvas").transform);
         * Vector2 screenPoint = RectTransformUtility.WorldToScreenPoint (Camera.main, transform.position);
         * bombText.GetComponent<RectTransform>().anchoredPosition = screenPoint;*/
    }
Esempio n. 3
0
 void Start()
 {
     phaseScript = GameObject.Find("Player").GetComponent <PhaseScript>();
     DontDestroyOnLoad(GameObject.Find("Canvas"));
     DontDestroyOnLoad(GameObject.Find("Player"));
     DontDestroyOnLoad(GameObject.Find("UIManager"));
     DontDestroyOnLoad(GameObject.Find("BombCanvas"));
     DontDestroyOnLoad(gameObject);
     updatePhaseVariables(1);
 }
Esempio n. 4
0
 void Start()
 {
     phaseScript = GameObject.Find ("Player").GetComponent<PhaseScript>();
     DontDestroyOnLoad (GameObject.Find ("Canvas"));
     DontDestroyOnLoad (GameObject.Find ("Player"));
     DontDestroyOnLoad (GameObject.Find ("UIManager"));
     DontDestroyOnLoad (GameObject.Find ("BombCanvas"));
     DontDestroyOnLoad (gameObject);
     updatePhaseVariables (1);
 }
Esempio n. 5
0
    // Use this for initialization
    void Start()
    {
        ourGlobalScript = this;

        ourUnitScripts = Object.FindObjectsOfType <UnitScript>();

        ourPlayerScripts = Object.FindObjectsOfType <PlayerScript>();

        ourCursorScript = Object.FindObjectOfType <CursorScript>();

        ourTurnScript = Object.FindObjectOfType <TurnScript>();

        ourPhaseScript = Object.FindObjectOfType <PhaseScript>();
    }
Esempio n. 6
0
    // Use this for initialization
    void Start()
    {
        ourGlobalScript = this;

        ourUnitScripts = Object.FindObjectsOfType<UnitScript>();

        ourPlayerScripts = Object.FindObjectsOfType<PlayerScript>();

        ourCursorScript = Object.FindObjectOfType<CursorScript>();

        ourTurnScript = Object.FindObjectOfType<TurnScript>();

        ourPhaseScript = Object.FindObjectOfType<PhaseScript>();
    }
Esempio n. 7
0
 void Start()
 {
     Color color = GetComponent<SpriteRenderer> ().color;
     color.a = 0.5f;
     GetComponent<SpriteRenderer> ().color = color;
     phaseScript = GameObject.Find ("Player").GetComponent<PhaseScript>();
     DontDestroyOnLoad (GameObject.Find ("Canvas"));
     DontDestroyOnLoad (GameObject.Find ("Player"));
     DontDestroyOnLoad (GameObject.Find ("UIManager"));
     DontDestroyOnLoad (GameObject.Find ("BombCanvas"));
     DontDestroyOnLoad (gameObject);
     levelNum = int.Parse(File.ReadAllText ("data.txt"));
     if (levelNum != 1)
         LoadLevel (levelNum);
     else
         updatePhaseVariables (1);
 }
Esempio n. 8
0
    void Start()
    {
        Color color = GetComponent <SpriteRenderer> ().color;

        color.a = 0.5f;
        GetComponent <SpriteRenderer> ().color = color;
        phaseScript = GameObject.Find("Player").GetComponent <PhaseScript>();
        DontDestroyOnLoad(GameObject.Find("Canvas"));
        DontDestroyOnLoad(GameObject.Find("Player"));
        DontDestroyOnLoad(GameObject.Find("UIManager"));
        DontDestroyOnLoad(GameObject.Find("BombCanvas"));
        DontDestroyOnLoad(gameObject);
        levelNum = int.Parse(File.ReadAllText("data.txt"));
        if (levelNum != 1)
        {
            LoadLevel(levelNum);
        }
        else
        {
            updatePhaseVariables(1);
        }
    }
Esempio n. 9
0
 void Awake()
 {
     phaseManager = GameObject.Find("Player").GetComponent <PhaseScript> ();
 }
Esempio n. 10
0
 void Awake()
 {
     anim         = GetComponent <Animator> ();
     rb2d         = GetComponent <Rigidbody2D> ();
     phaseManager = GetComponent <PhaseScript> ();
 }
Esempio n. 11
0
 void Awake()
 {
     anim = GetComponent<Animator> ();
     rb2d = GetComponent<Rigidbody2D> ();
     phaseManager = GetComponent<PhaseScript> ();
 }
Esempio n. 12
0
 void Awake()
 {
     phaseManager = GameObject.Find ("Player").GetComponent<PhaseScript> ();
 }