// 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;*/ }
// 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;*/ }
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); }
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); }
// 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>(); }
// 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>(); }
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); }
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); } }
void Awake() { phaseManager = GameObject.Find("Player").GetComponent <PhaseScript> (); }
void Awake() { anim = GetComponent <Animator> (); rb2d = GetComponent <Rigidbody2D> (); phaseManager = GetComponent <PhaseScript> (); }
void Awake() { anim = GetComponent<Animator> (); rb2d = GetComponent<Rigidbody2D> (); phaseManager = GetComponent<PhaseScript> (); }
void Awake() { phaseManager = GameObject.Find ("Player").GetComponent<PhaseScript> (); }