public void TestHUDMethods()
 {
     GameHUD HUD = new GameHUD();
     try{
         HUD.Start();
         HUD.OnGUI();
         HUD.Update();
     }catch(Exception e) {
         //Something went wrong
         Assert.True(false,"error "+e.ToString());
     }
 }
        public void TestHUDMethods()
        {
            GameHUD HUD = new GameHUD();

            try{
                HUD.Start();
                HUD.OnGUI();
                HUD.Update();
            }catch (Exception e) {
                //Something went wrong
                Assert.True(false, "error " + e.ToString());
            }
        }
Esempio n. 3
0
    void Start()
    {
        Time.timeScale = timescale;
        DontDestroyOnLoad(transform.gameObject);

        if (networkView == null)
        {
            gameObject.AddComponent <NetworkView>();
        }

        networkView.stateSynchronization = NetworkStateSynchronization.Off;
        networkView.observed             = null;

        camera_.Start();

        statistic.Start();

        character.game = this;
        character.Start();

        if (progress == null)
        {
            progress = gameObject.GetComponent <GameProgress>();
            if (progress == null)
            {
                progress = gameObject.AddComponent <GameProgress>();
            }
        }

        if (result == null)
        {
            result = gameObject.GetComponent <GameResult>();
            if (result == null)
            {
                result = gameObject.AddComponent <GameResult>();
            }
            result.game = this;
        }

        hud.Start();

        MasterServerManager.postBeforeDisconnected += ListenBeforeDisconnected;
    }