Esempio n. 1
0
    public void Start()
    {
        //Application.RegisterLogCallback(HandleLog);
        Application.logMessageReceived += HandleLog;

        MeshUtils.InitStaticValues();
        CubeWorldPlayerPreferences.LoadPreferences();
        PreferencesUpdated();

        State    = state = GameManagerUnityState.MAIN_MENU;
        mainMenu = new MainMenu(this);

        sectorManagerUnity  = new SectorManagerUnity(this);
        objectsManagerUnity = new CWObjectsManagerUnity(this);
        fxManagerUnity      = new CWFxManagerUnity(this);

        worldManagerUnity = new WorldManagerUnity(this);

        Screen.autorotateToLandscapeLeft      = true;
        Screen.autorotateToLandscapeRight     = true;
        Screen.autorotateToPortrait           = false;
        Screen.autorotateToPortraitUpsideDown = false;
        WidthRatio  = Screen.width / virtualWidth;
        HeightRatio = Screen.height / virtualWidth;
    }
        public MultiplayerGameLoaderGenerator(WorldManagerUnity worldManagerUnity, string server, int port)
        {
#if UNITY_WEBPLAYER
            Security.PrefetchSocketPolicy(server, port);
#endif
            this.worldManagerUnity   = worldManagerUnity;
            mutiplayerClientGameplay = new MultiplayerClientGameplay(server, port);
        }
Esempio n. 3
0
    public void Start()
    {
        Application.RegisterLogCallback(HandleLog);

        MeshUtils.InitStaticValues();
        CubeWorldPlayerPreferences.LoadPreferences();
        PreferencesUpdated();

        State    = state = GameManagerUnityState.MAIN_MENU;
        mainMenu = new MainMenu(this);

        sectorManagerUnity  = new SectorManagerUnity(this);
        objectsManagerUnity = new CWObjectsManagerUnity(this);
        fxManagerUnity      = new CWFxManagerUnity(this);

        worldManagerUnity = new WorldManagerUnity(this);
    }
Esempio n. 4
0
    public void Start()
    {
        Application.RegisterLogCallback(HandleLog);

        MeshUtils.InitStaticValues();
        CubeWorldPlayerPreferences.LoadPreferences();
        PreferencesUpdated();

        State = state = GameManagerUnityState.MAIN_MENU;
        mainMenu = new MainMenu(this);

		sectorManagerUnity = new SectorManagerUnity(this);
		objectsManagerUnity = new CWObjectsManagerUnity(this);
        fxManagerUnity = new CWFxManagerUnity(this);

        worldManagerUnity = new WorldManagerUnity(this);
	}
Esempio n. 5
0
    void DrawMenuLoadSave(bool load)
    {
        if (load)
        {
            MenuSystem.BeginMenu("Load");
        }
        else
        {
            MenuSystem.BeginMenu("Save");
        }

        for (int i = 0; i < 5; i++)
        {
            System.DateTime fileDateTime = WorldManagerUnity.GetWorldFileInfo(i);

            if (fileDateTime != System.DateTime.MinValue)
            {
                string prefix;
                if (load)
                {
                    prefix = "Load World ";
                }
                else
                {
                    prefix = "Overwrite World";
                }

                MenuSystem.Button(prefix + (i + 1).ToString() + " [ " + fileDateTime.ToString() + " ]", delegate()
                {
                    if (load)
                    {
                        gameManagerUnity.worldManagerUnity.LoadWorld(i);
                        state = MainMenuState.NORMAL;
                    }
                    else
                    {
                        gameManagerUnity.worldManagerUnity.SaveWorld(i);
                        state = MainMenuState.NORMAL;
                    }
                }
                                  );
            }
            else
            {
                MenuSystem.Button("-- Empty Slot --", delegate()
                {
                    if (load == false)
                    {
                        gameManagerUnity.worldManagerUnity.SaveWorld(i);
                        state = MainMenuState.NORMAL;
                    }
                }
                                  );
            }
        }

        MenuSystem.LastButton("Return", delegate()
        {
            state = MainMenuState.NORMAL;
        }
                              );

        MenuSystem.EndMenu();
    }
Esempio n. 6
0
 public MultiplayerGameLoaderGenerator(WorldManagerUnity worldManagerUnity, string server, int port)
 {
     this.worldManagerUnity   = worldManagerUnity;
     mutiplayerClientGameplay = new MultiplayerClientGameplay(server, port);
 }
Esempio n. 7
0
        public MultiplayerGameLoaderGenerator(WorldManagerUnity worldManagerUnity, string server, int port)
        {
#if UNITY_WEBPLAYER
            Security.PrefetchSocketPolicy(server, port);
#endif
            this.worldManagerUnity = worldManagerUnity;
            mutiplayerClientGameplay = new MultiplayerClientGameplay(server, port);
        }