示例#1
0
 // Use this for initialization
 void Start()
 {
     guitimer           = UIpanel.GetComponentInChildren <GUITimer> ();
     guiscore           = UIpanel.transform.parent.GetComponentInChildren <CanvasGroup> ();
     startTime          = false;
     panelSpinAnimation = GetComponent <Animator> ();
     my_audio           = GetComponent <AudioSource> ();
     master_audio       = GameObject.Find("map").GetComponent <AudioSource> ();
 }
示例#2
0
        public ForkGenerator()
        {
            InitializeComponent();

            Timer_Log.Start();
            MainTimer.Start();
            GUITimer.Start();


            OutputConsole.Font       = new Font("Consolas", 12, FontStyle.Regular);
            OutputConsole.AutoScroll = true;
        }
    /// <summary>
    /// Initialises the game mode manager
    /// </summary>
    void Start()
    {
        if (!Utilities.IsOpenLeveL(Utilities.GetLoadedLevel()))
        {
            m_networkedState = GameState.STAGE_1;
            m_state          = GameState.STAGE_1;

            m_countdownTimer = FindObjectOfType <GUITimer>();
            if (m_countdownTimer == null)
            {
                Debug.LogError("Could not find GUI Count down timer");
            }
        }

        m_islandList = GameObject.FindObjectsOfType <IslandDiscoveryTrigger>();
        if (m_islandList.Length == 0)
        {
            Debug.LogError("Could not find any islands");
        }

        m_fogOfWar = FindObjectOfType <FogOfWar>();
        if (m_fogOfWar == null)
        {
            Debug.LogError("Could not find Fog of war");
        }

        m_stage1CountdownFinish = () =>
        {
            SwitchToState(GameState.STAGE_2);
            m_stateInitiatedByNetwork = false;
        };

        m_stage2CountdownFinish = () =>
        {
            GameOverScript.Get().SetLevelComplete();
        };
    }
    /// <summary>
    /// Initialises the game mode manager
    /// </summary>  
    void Start()
    {
        if(!Utilities.IsOpenLeveL(Utilities.GetLoadedLevel()))
        {
            m_networkedState = GameState.STAGE_1;
            m_state = GameState.STAGE_1;

            m_countdownTimer = FindObjectOfType<GUITimer>();
            if (m_countdownTimer == null)
            {
                Debug.LogError("Could not find GUI Count down timer");
            }
        }

        m_islandList = GameObject.FindObjectsOfType<IslandDiscoveryTrigger>();
        if(m_islandList.Length == 0)
        {
            Debug.LogError("Could not find any islands");
        }

        m_fogOfWar = FindObjectOfType<FogOfWar>();
        if(m_fogOfWar == null)
        {
            Debug.LogError("Could not find Fog of war");
        }

        m_stage1CountdownFinish = () =>
        {
            SwitchToState(GameState.STAGE_2);
            m_stateInitiatedByNetwork = false;
        };

        m_stage2CountdownFinish = () =>
        {
            GameOverScript.Get().SetLevelComplete();
        };
    }