예제 #1
0
    void Awake()
    {
        //Add all the necessary components
        LocationHandler locationHandler = gameObject.AddComponent <LocationHandler> ();

        locationHandler.Init();

        //Set up displays
        m_displays = new Dictionary <string, DisplayHandler>();
        DisplayHandler[] displayChildren = gameObject.GetComponentsInChildren <DisplayHandler>();

        foreach (DisplayHandler display in displayChildren)
        {
            display.Init();
            display.HideDisplay();
            m_displays.Add(display.DisplayName, display);
        }

        m_dramaManager = new DramaManager(Screen.width, Screen.height);
        currGameState  = m_dramaManager.GetRandomStartState();

        //Start the display to start with
        if (m_displays.ContainsKey(displayToStartWith))
        {
            m_currDisplay = displayToStartWith;
            m_displays[m_currDisplay].SwitchToDisplay();
        }
        else
        {
            Debug.LogError("GameplayManager Error: displayToStartWith did not match a Handler name");
        }

        Instance = this;
    }
예제 #2
0
    private void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
        else
        {
            Destroy(this);
        }

        //StorySetup();
        AssetLoad();
        supportActors.Add("Player");
    }