public void OwnRegion(Region region) { this.Region = region; this.Region.OnKaijuMovingIn(this); this.kaijuEmpire.Region = region; if (this.OnRegionChanged != null) { this.OnRegionChanged(this.Region); } this.CallRefreshProvidedRegionEffects(); DepartmentOfTheInterior.GenerateResourcesLeechingForTamedKaijus(this); }
protected override IEnumerator OnLoadGame(Amplitude.Unity.Game.Game game) { IGameEntityRepositoryService gameEntityRepositoryService = game.Services.GetService<IGameEntityRepositoryService>(); Diagnostics.Assert(gameEntityRepositoryService != null); Diagnostics.Assert(game.Services.GetService<IWorldPositionningService>() != null); if (this.TamedKaijus != null) { int num; for (int index = 0; index < this.TamedKaijus.Count; index = num + 1) { Kaiju kaiju = this.TamedKaijus[index]; if (kaiju != null) { KaijuEmpire kaijuEmpire = (game as global::Game).Empires[kaiju.KaijuEmpireIndex] as KaijuEmpire; kaiju.KaijuEmpire = kaijuEmpire; yield return kaiju.OnLoadGame(game); kaiju.MajorEmpire = this; base.AddChild(kaiju); gameEntityRepositoryService.Register(kaiju); DepartmentOfTheInterior.GenerateResourcesLeechingForTamedKaijus(kaiju); } kaiju = null; num = index; kaiju = null; kaiju = null; kaiju = null; kaiju = null; } this.Refresh(false); } this.IsSpectator = (base.Faction.Name == "FactionELCPSpectator"); this.ELCPIsEliminated = this.IsEliminated; if (this.ELCPIsEliminated) { ELCPUtilities.EliminatedEmpireIndices.Add(base.Index); } yield return base.OnLoadGame(game); yield break; }