public static int gamerGold = 1000000; // For Shell // public int maxOfMissedCreepsForComputer0; // public int missedCreepsForComputer0; // public int maxOfMissedCreepsForPlayer1; // public int missedCreepsForPlayer1; // GAME INTERFACE ZONE2 // LineRenderer lineRenderer; // Use this for initialization void Start() { Debug.Log("GameField::Start(); -- Start!"); waveManager = new WaveManager(); creepsManager = new CreepsManager(); towersManager = new TowersManager(); factionsManager = new FactionsManager(1f); factionsManager.loadFactions(); gamefield = GameObject.Find("GameField"); Map map = new MapLoader().loadMap(mapPath); sizeFieldX = int.Parse(map.properties ["width"]); sizeFieldZ = int.Parse(map.properties ["height"]); // lineRenderer = gameObject.AddComponent<LineRenderer>(); createField(sizeFieldX, sizeFieldZ, map.mapLayers); Creeps = new GameObject("Creeps"); Creeps.transform.position = new Vector3(0, 10, 0); GameObject NavMesh = new GameObject("NavMesh"); NavMesh.AddComponent <NavMeshSurface>(); // var geo = NavMesh.GetComponent<NavMeshSurface>(); // geo.overrideTileSize = true; // geo.tileSize = 64; //geo.useGeometry = NavMeshCollectGeometry.PhysicsColliders; surface = GameObject.Find("NavMesh").GetComponent <NavMeshSurface>(); surface.BuildNavMesh(); WaveAlgorithm waveAlgorithm = new WaveAlgorithm(sizeFieldX, sizeFieldZ, 30, 30, field); Debug.Log("GameField::Start(); -- End!"); }
private void Awake() { FactionsManager.SetFactions(); RelationshipManager.InitializeRelations(); ShipsManager.SetFactions(); BuildingsManager.SetFactions(); }
private void Awake() { armyCollections = new ArmyCollections(); factionsManager = new FactionsManager(); _instance = this; destinyRegion = ""; canMoveArmy = true; updating = true; hasGameEnded = false; }
private bool SetupManagers( ) { _dedicatedServerWrapper = DedicatedServerAssemblyWrapper.Instance; _pluginManager = PluginManager.Instance; _factionsManager = FactionsManager.Instance; _entityEventManager = EntityEventManager.Instance; _chatManager = ChatManager.Instance; _sessionManager = SessionManager.Instance; return(true); }
private bool SetupManagers() { m_serverWrapper = ServerAssemblyWrapper.Instance; m_pluginManager = PluginManager.Instance; m_gameAssemblyWrapper = SandboxGameAssemblyWrapper.Instance; m_factionsManager = FactionsManager.Instance; m_logManager = LogManager.Instance; m_entityEventManager = EntityEventManager.Instance; m_chatManager = ChatManager.Instance; return(true); }
private void Awake() { if (instance == null) { instance = this; } else { Destroy(this); } factions = new Dictionary <string, Factions>(); foreach (Factions faction in initialiseFactions) { factions.Add(faction.factionName, faction); } }
// If there none make one. private void Awake() { // Make one. if (instance == null) { instance = this; } // If there is another, destroy this. else { Destroy(this); } factions = new Dictionary <string, Factions>(); foreach (Factions faction in initaliseFactions) { factions.Add(faction.factionName, faction); } }
private void UpdateAllResources(bool isNewTurnStarted) { if (!isNewTurnStarted) { return; } if (_faction == null) { _faction = FactionsManager.GetUser(); } Debug.Log("Отслеживаемая в UI фракция:" + _faction.ID); Debug.Log("UpdateAllResources вызван"); //Debug.Log("Food= " + city.CityResources.Food + ", FoodIncome=" + city.CityResources.FoodProfit); UpdateResource(_faction.ID, _faction.FactionResources.Money, GameEvents1.FactionResourcesChanged.MONEY_RESOURCE_CHANGED.ToString()); UpdateProfit(_faction.ID, _faction.FactionResources.MoneyProfit, GameEvents1.FactionResourcesProfitChanged.FACTION_MONEY_PROFIT_RESOURCE_CHANGED.ToString()); }
protected bool RunBaseReflectionUnitTests() { bool result = true; if (!SandboxGameAssemblyWrapper.ReflectionUnitTest()) { result = false; Console.WriteLine("SandboxGameAssemblyWrapper reflection validation failed!"); } if (!ServerAssemblyWrapper.ReflectionUnitTest()) { result = false; Console.WriteLine("ServerAssemblyWrapper reflection validation failed!"); } if (!NetworkManager.ReflectionUnitTest()) { result = false; Console.WriteLine("NetworkManager reflection validation failed!"); } if (!ServerNetworkManager.ReflectionUnitTest()) { result = false; Console.WriteLine("ServerNetworkManager reflection validation failed!"); } if (!UtilityFunctions.ReflectionUnitTest()) { result = false; Console.WriteLine("UtilityFunctions reflection validation failed!"); } if (!ChatManager.ReflectionUnitTest()) { result = false; Console.WriteLine("ChatManager reflection validation failed!"); } if (!PlayerMap.ReflectionUnitTest()) { result = false; Console.WriteLine("PlayerMap reflection validation failed!"); } if (!PlayerManager.ReflectionUnitTest()) { result = false; Console.WriteLine("PlayerManager reflection validation failed!"); } if (!WorldManager.ReflectionUnitTest()) { result = false; Console.WriteLine("WorldManager reflection validation failed!"); } if (!RadioManager.ReflectionUnitTest()) { result = false; Console.WriteLine("RadioManager reflection validation failed!"); } if (!RadioManagerNetworkManager.ReflectionUnitTest()) { result = false; Console.WriteLine("RadioManagerNetworkManager reflection validation failed!"); } if (!PowerManager.ReflectionUnitTest()) { result = false; Console.WriteLine("PowerManager reflection validation failed!"); } if (!FactionsManager.ReflectionUnitTest()) { result = false; Console.WriteLine("FactionsManager reflection validation failed!"); } if (!Faction.ReflectionUnitTest()) { result = false; Console.WriteLine("Faction reflection validation failed!"); } if (!GameEntityManager.ReflectionUnitTest()) { result = false; Console.WriteLine("GameEntityManager reflection validation failed!"); } if (result) { Console.WriteLine("All main types passed reflection unit tests!"); } return(result); }
protected bool RunReflectionUnitTests() { bool result = true; if (!BaseObject.ReflectionUnitTest()) { result = false; Console.WriteLine("BaseObject reflection validation failed!"); } if (!BaseEntity.ReflectionUnitTest()) { result = false; Console.WriteLine("BaseEntity reflection validation failed!"); } if (!BaseEntityNetworkManager.ReflectionUnitTest()) { result = false; Console.WriteLine("BaseEntityNetworkManager reflection validation failed!"); } if (!CubeGridEntity.ReflectionUnitTest()) { result = false; Console.WriteLine("CubeGridEntity reflection validation failed!"); } if (!CubeGridNetworkManager.ReflectionUnitTest()) { result = false; Console.WriteLine("CubeGridNetworkManager reflection validation failed!"); } if (!CubeBlockEntity.ReflectionUnitTest()) { result = false; Console.WriteLine("CubeBlockEntity reflection validation failed!"); } if (!TerminalBlockEntity.ReflectionUnitTest()) { result = false; Console.WriteLine("TerminalBlockEntity reflection validation failed!"); } if (!FunctionalBlockEntity.ReflectionUnitTest()) { result = false; Console.WriteLine("FunctionalBlockEntity reflection validation failed!"); } if (!SectorObjectManager.ReflectionUnitTest()) { result = false; Console.WriteLine("SectorObjectManager reflection validation failed!"); } if (!CharacterEntity.ReflectionUnitTest()) { result = false; Console.WriteLine("CharacterEntity reflection validation failed!"); } if (!InventoryEntity.ReflectionUnitTest()) { result = false; Console.WriteLine("InventoryEntity reflection validation failed!"); } if (!InventoryItemEntity.ReflectionUnitTest()) { result = false; Console.WriteLine("InventoryItemEntity reflection validation failed!"); } if (!PlayerMap.ReflectionUnitTest()) { result = false; Console.WriteLine("PlayerMap reflection validation failed!"); } if (!PlayerManager.ReflectionUnitTest()) { result = false; Console.WriteLine("PlayerManager reflection validation failed!"); } if (!WorldManager.ReflectionUnitTest()) { result = false; Console.WriteLine("WorldManager reflection validation failed!"); } if (!RadioManager.ReflectionUnitTest()) { result = false; Console.WriteLine("RadioManager reflection validation failed!"); } if (!RadioManagerNetworkManager.ReflectionUnitTest()) { result = false; Console.WriteLine("RadioManagerNetworkManager reflection validation failed!"); } if (!PowerManager.ReflectionUnitTest()) { result = false; Console.WriteLine("PowerManager reflection validation failed!"); } if (!FactionsManager.ReflectionUnitTest()) { result = false; Console.WriteLine("FactionsManager reflection validation failed!"); } if (!Faction.ReflectionUnitTest()) { result = false; Console.WriteLine("Faction reflection validation failed!"); } if (!PowerProducer.ReflectionUnitTest()) { result = false; Console.WriteLine("PowerProducer reflection validation failed!"); } if (!PowerReceiver.ReflectionUnitTest()) { result = false; Console.WriteLine("PowerReceiver reflection validation failed!"); } result &= RunCubeBlockReflectionTests(); if (result) { Console.WriteLine("All main types passed reflection unit tests!"); } return(result); }
protected bool RunBaseReflectionUnitTests() { bool result = true; if (!DedicatedServerAssemblyWrapper.ReflectionUnitTest()) { result = false; BaseLog.Warn("DedicatedServerAssemblyWrapper reflection validation failed!"); } if (!ServerNetworkManager.ReflectionUnitTest()) { result = false; BaseLog.Warn("ServerNetworkManager reflection validation failed!"); } if (!UtilityFunctions.ReflectionUnitTest()) { result = false; BaseLog.Warn("UtilityFunctions reflection validation failed!"); } if (!ChatManager.ReflectionUnitTest()) { result = false; BaseLog.Warn("ChatManager reflection validation failed!"); } if (!PlayerMap.ReflectionUnitTest()) { result = false; BaseLog.Warn("PlayerMap reflection validation failed!"); } if (!PlayerManager.ReflectionUnitTest()) { result = false; BaseLog.Warn("PlayerManager reflection validation failed!"); } if (!WorldManager.ReflectionUnitTest()) { result = false; BaseLog.Warn("WorldManager reflection validation failed!"); } if (!RadioManager.ReflectionUnitTest()) { result = false; BaseLog.Warn("RadioManager reflection validation failed!"); } if (!RadioManagerNetworkManager.ReflectionUnitTest()) { result = false; BaseLog.Warn("RadioManagerNetworkManager reflection validation failed!"); } if (!FactionsManager.ReflectionUnitTest()) { result = false; BaseLog.Warn("FactionsManager reflection validation failed!"); } if (!Faction.ReflectionUnitTest()) { result = false; BaseLog.Warn("Faction reflection validation failed!"); } if (!GameEntityManager.ReflectionUnitTest()) { result = false; BaseLog.Warn("GameEntityManager reflection validation failed!"); } if (result) { BaseLog.Info("All main types passed reflection unit tests!"); } return(result); }