// Use this for initialization void Start () { if (stateMachine == null) stateMachine = GameObject.FindGameObjectWithTag("SM").GetComponent<CentralStateScript>(); anim = GetComponent<Animator>(); displayScore = false; }
// Use this for initialization void Start () { anim = GetComponent<Animator> (); isGameOver = false; if (stateMachine == null) stateMachine = GameObject.FindGameObjectWithTag("SM").GetComponent<CentralStateScript>(); }
// Use this for initialization void Start() { if (stateMachine == null) { stateMachine = GameObject.FindGameObjectWithTag("SM").GetComponent <CentralStateScript>(); } }
// Use this for initialization void Start () { lineRenderer = GetComponent<LineRenderer> (); lineRenderer.enabled = true; lineRenderer.useWorldSpace = true; stateMachine = GameObject.FindGameObjectWithTag("SM").GetComponent<CentralStateScript>(); direction = (GameObject)Instantiate(Resources.Load("direction"), laserHit.position + new Vector3(0, transform.localScale.x * 0.5f, 0), laserHit.rotation); _facing = direction.transform.rotation; }
// Use this for initialization void Start() { if (stateMachine == null) { stateMachine = GameObject.FindGameObjectWithTag("SM").GetComponent <CentralStateScript>(); } anim = GetComponent <Animator>(); displayScore = false; }
// Use this for initialization void Start() { lineRenderer = GetComponent <LineRenderer> (); lineRenderer.enabled = true; lineRenderer.useWorldSpace = true; stateMachine = GameObject.FindGameObjectWithTag("SM").GetComponent <CentralStateScript>(); direction = (GameObject)Instantiate(Resources.Load("direction"), laserHit.position + new Vector3(0, transform.localScale.x * 0.5f, 0), laserHit.rotation); _facing = direction.transform.rotation; }
void Start() { time = GetComponent <Text>(); stopTimer = false; if (stateMachine == null) { stateMachine = GameObject.FindGameObjectWithTag("SM").GetComponent <CentralStateScript>(); } }
// Use this for initialization void Start () { if (stateMachine == null) stateMachine = GameObject.FindGameObjectWithTag("SM").GetComponent<CentralStateScript>(); Debug.Assert (stateMachine); rg2d = GetComponent<Rigidbody2D> (); rg2d.mass = 2; Vector2 initial_Dir = new Vector2 (-4, 1); rg2d.AddForce (7*initial_Dir.normalized, ForceMode2D.Impulse); //Initialize Movement }
// Use this for initialization void Start() { anim = GetComponent <Animator> (); isGameOver = false; if (stateMachine == null) { stateMachine = GameObject.FindGameObjectWithTag("SM").GetComponent <CentralStateScript>(); } }
// Use this for initialization void Start () { if (stateMachine == null) stateMachine = GameObject.FindGameObjectWithTag("SM").GetComponent<CentralStateScript>(); OxygenBar = GetComponent<Image> (); //Assertions Debug.Assert (stateMachine); Debug.Assert (OxygenBar); }
// Use this for initialization void Start() { if (stateMachine == null) { stateMachine = GameObject.FindGameObjectWithTag("SM").GetComponent <CentralStateScript>(); } OxygenBar = GetComponent <Image> (); //Assertions Debug.Assert(stateMachine); Debug.Assert(OxygenBar); }
// Use this for initialization void Start() { if (stateMachine == null) { stateMachine = GameObject.FindGameObjectWithTag("SM").GetComponent <CentralStateScript>(); } Debug.Assert(stateMachine); rg2d = GetComponent <Rigidbody2D> (); rg2d.mass = 2; Vector2 initial_Dir = new Vector2(-4, 1); rg2d.AddForce(7 * initial_Dir.normalized, ForceMode2D.Impulse); //Initialize Movement }
// Use this for initialization void Start() { if (stateMachine == null) stateMachine = GameObject.FindGameObjectWithTag("SM").GetComponent<CentralStateScript>(); text = GetComponent<Text>(); if (HUDCanvas == null) HUDCanvas = GameObject.FindGameObjectWithTag("HUD").GetComponent<Canvas>(); totalScore = 0; timeScore = 0; coinScore = 0; scoreMultiplier = 1; Transform t = HUDCanvas.transform.FindChild("Timer"); time = t.gameObject.GetComponent<TimerScript>(); InvokeRepeating("UpdateScore", 0, 0.1f); }
// Use this for initialization void Start() { if (stateMachine == null) { stateMachine = GameObject.FindGameObjectWithTag("SM").GetComponent <CentralStateScript>(); } text = GetComponent <Text>(); if (HUDCanvas == null) { HUDCanvas = GameObject.FindGameObjectWithTag("HUD").GetComponent <Canvas>(); } totalScore = 0; timeScore = 0; coinScore = 0; scoreMultiplier = 1; Transform t = HUDCanvas.transform.FindChild("Timer"); time = t.gameObject.GetComponent <TimerScript>(); InvokeRepeating("UpdateScore", 0, 0.1f); }
void Start () { time = GetComponent<Text>(); stopTimer = false; if (stateMachine == null) stateMachine = GameObject.FindGameObjectWithTag("SM").GetComponent<CentralStateScript>(); }
// Use this for initialization void Start () { if (stateMachine == null) stateMachine = GameObject.FindGameObjectWithTag("SM").GetComponent<CentralStateScript>(); }