// Start is called before the first frame update void Start() { // stop the particle system at the start, it only needs to run when player touches gameObject gameObject.GetComponent <ParticleSystem>().Stop(); // get the pauseGame script from the pause gameObject. my_pauseGame_script = pauseObject.GetComponent <pauseGame>(); }
// Start is called before the first frame update void Start() { // stop the particle system at the start, it only needs to run when player touches gameObject gameObject.GetComponent <ParticleSystem>().Stop(); // get the pauseGame script from the pause gameObject. my_pauseGame_script = pauseObject.GetComponent <pauseGame>(); TimerObj = GameObject.FindGameObjectWithTag("Timer"); my_Timer_script = TimerObj.GetComponent <Timer>(); }
private void Awake() { if (singleton == null) { singleton = this; return; } Destroy(this); }
void GetPauseMenu() { bIndexList = new List <bool> (); pauseMenu = GameObject.FindGameObjectWithTag("PauseMenu").transform.GetComponent <pauseGame>(); bIndexList.Add(notebook); bIndexList.Add(bottle_1); bIndexList.Add(bottle_2); bIndexList.Add(bottle_3); bIndexList.Add(bottle_4); bIndexList.Add(key); bIndexList.Add(flask); }
// Use this for initialization void Start() { pauseScript = GameObject.FindGameObjectWithTag("PauseMenu").GetComponent <pauseGame> (); gameController = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameController>(); lineRen = GetComponent <LineRenderer>(); targetRen = target.GetComponent <Renderer> (); targetCollision = target.GetComponent <collisionCheck> (); lineRen.startWidth = 0.002f; lineRen.endWidth = 0.002f; heldDown = false; lineRen.enabled = true; //targetRen.enabled = false; RaycastHit hit; Ray ray = new Ray(aimer.transform.position, aimer.transform.forward); if (Physics.Raycast(ray, out hit)) { end.transform.position = hit.point; } lineRen.SetPosition(0, start.transform.position); lineRen.SetPosition(1, end.transform.position); }
void Start() { anim = this.GetComponent <Animator>(); pauseGameScript = GameObject.Find("pauseButton").GetComponent <pauseGame>(); }
private void Start() { pauseScript = GameObject.FindGameObjectWithTag("UIManager").GetComponent <pauseGame>(); }