Example #1
0
    //Interaction not triggering? Does the mouse manager exist?

    public void Interact()
    {
        if (CanInteract)
        {
            if (progressFlag)
            {
                TownProgression townProgression = GameObject.FindGameObjectWithTag("Manager").GetComponent <TownProgression>();
                if (townProgression.currentState == TownProgression.TownCurrentState.Starting)
                {
                    townProgression.currentState = TownProgression.TownCurrentState.Progressed;
                }
                else if (townProgression.currentState == TownProgression.TownCurrentState.Progressed)
                {
                    townProgression.currentState = TownProgression.TownCurrentState.Complete;
                }
            }
            if (LoadLevel)
            {
                SceneManager.LoadScene(SceneNumber);
            }
        }
    }
Example #2
0
 // Use this for initialization
 void Start()
 {
     townProgression = GameObject.FindGameObjectWithTag("Manager").GetComponent <TownProgression>();
     townProgression.LoadTown(townPos);
 }