private void Update() { if (PointTrackerScript.Get() != null) { m_Text.text = "Score: " + PointTrackerScript.Get().Points.ToString("F0"); } }
// Use this for initialization void Start() { //MainMenuPanel = GameObject.Find ("MainMenuPanel"); sceneScript = GameObject.Find("SceneManagement").GetComponent <SceneManagement> (); canvas = GameObject.Find("Canvas"); pointScript = canvas.GetComponentInChildren <PointTrackerScript> (); timerScript = canvas.GetComponentInChildren <TimerScript> (); }
// Use this for initialization void Awake() { timerScript = GameObject.Find("Timer").GetComponent <TimerScript> (); pointScript = GameObject.Find("Point Tracker").GetComponent <PointTrackerScript> (); inGameUI = GameObject.Find("InGameUI"); textComponent = GetComponent <Text> (); inGameUI.SetActive(false); }
private void UpdateKarenChase() { if (PointTrackerScript.Get().Points >= m_PointsToWin) { m_WinBlinds.SetActive(false); m_WinWindow.SetActive(true); cc.SetActive(true); ChangeState(EGameState.BREAK_FREE); NarrativeAudioManager.Get().PlayLine(m_AWindowHasOpenedLine); } }
void Start() { myRigidbody = GetComponent <Rigidbody2D>(); mySpriteRenderer = GetComponent <SpriteRenderer>(); myAnimator = GetComponent <Animator>(); myAudioSource = GetComponent <AudioSource>(); lineRenderer = GetComponent <LineRenderer> (); myParticleSystem = GetComponent <ParticleSystem> (); sceneScript = GameObject.Find("SceneManagement").GetComponent <SceneManagement> (); pointScript = GameObject.Find("Point Tracker").GetComponent <PointTrackerScript> (); player = this.gameObject; startPos = transform.position; raycastLayerMask = LayerMask.GetMask("Floor") | LayerMask.GetMask("Unhookable") | LayerMask.GetMask("Traps"); deathOverlay = GameObject.Find("DeathOverlay"); deathText = GameObject.Find("DeathText"); alive = true; }
private void OnDestructibleDestroyed(DestructibleDestroyedEvent e) { PointTrackerScript.Get().AddPoints(m_points); GameEvent <DestructibleDestroyedEvent> .Unregister(OnDestructibleDestroyed); }
// Use this for initialization void Start() { myAnimator = GetComponent <Animator> (); pointScript = GameObject.Find("Point Tracker").GetComponent <PointTrackerScript> (); }
// Use this for initialization void Start() { fade = GameObject.Find("Fade"); sceneScript = GameObject.Find("SceneManagement").GetComponent <SceneManagement> (); pointScript = GameObject.Find("Point Tracker").GetComponent <PointTrackerScript> (); }