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); }
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); }
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); }
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(); }
public MultiplayerGameLoaderGenerator(WorldManagerUnity worldManagerUnity, string server, int port) { this.worldManagerUnity = worldManagerUnity; mutiplayerClientGameplay = new MultiplayerClientGameplay(server, port); }
public MultiplayerGameLoaderGenerator(WorldManagerUnity worldManagerUnity, string server, int port) { #if UNITY_WEBPLAYER Security.PrefetchSocketPolicy(server, port); #endif this.worldManagerUnity = worldManagerUnity; mutiplayerClientGameplay = new MultiplayerClientGameplay(server, port); }