예제 #1
0
 private void Update()
 {
     if (PointTrackerScript.Get() != null)
     {
         m_Text.text = "Score: " + PointTrackerScript.Get().Points.ToString("F0");
     }
 }
예제 #2
0
 // 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> ();
 }
예제 #3
0
 // 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);
 }
예제 #4
0
    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);
        }
    }
예제 #5
0
    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;
    }
예제 #6
0
 private void OnDestructibleDestroyed(DestructibleDestroyedEvent e)
 {
     PointTrackerScript.Get().AddPoints(m_points);
     GameEvent <DestructibleDestroyedEvent> .Unregister(OnDestructibleDestroyed);
 }
예제 #7
0
 // Use this for initialization
 void Start()
 {
     myAnimator  = GetComponent <Animator> ();
     pointScript = GameObject.Find("Point Tracker").GetComponent <PointTrackerScript> ();
 }
예제 #8
0
 // Use this for initialization
 void Start()
 {
     fade        = GameObject.Find("Fade");
     sceneScript = GameObject.Find("SceneManagement").GetComponent <SceneManagement> ();
     pointScript = GameObject.Find("Point Tracker").GetComponent <PointTrackerScript> ();
 }