예제 #1
0
 /// <summary>
 /// Retrievs all services and components needed to start the game
 /// </summary>
 private void GetComponentsServicesToEnable()
 {
     this.cameraService   = this.Game.GetService <CameraService>();
     this.pickingService  = this.Game.GetService <PickingService>();
     this.gameScreen      = this.Game.Components.OfType <GameScreen>().ElementAt(0);
     this.gameField       = this.Game.Components.OfType <GameField>().ElementAt(0);
     this.humansParent    = this.Game.Components.OfType <HumansParent>().ElementAt(0);
     this.buildingsParent = this.Game.Components.OfType <BuildingsParent>().ElementAt(0);
     this.resourcesParent = this.Game.Components.OfType <ResourcesParent>().ElementAt(0);
     this.menuCaller      = this.Game.Components.OfType <MenusCaller>().ElementAt(0);
     this.resourcesHUD    = this.Game.Components.OfType <ResourcesHUD>().ElementAt(0);
 }
예제 #2
0
 public void SetBuildingsResourcesParent(ref BuildingsParent buildingsParent, ref ResourcesParent resourcesParent)
 {
     this.buildingsParent = buildingsParent;
     this.resourcesParent = resourcesParent;
 }