Exemplo n.º 1
0
 public void InstantiatePlayer(Controllers.Game gameController)
 {
     Planets.SpawningPoint point = gameController.PlanetSpawner.PlayerSpawningPlanet;
     this.PlayerObject              = Instantiate(this.Prefab, new Vector3(point.X, point.Y, 0), Quaternion.Euler(0, 0, Random.value * 360));
     this.AttractableBody           = this.PlayerObject.GetComponent <Physic.AttractableBody>();
     this.AttractableBody.GameSpeed = gameController.GameSpeed;
     this.SetClosestAttractiveBody(point);
 }
Exemplo n.º 2
0
 private void SetClosestAttractiveBody(Planets.SpawningPoint point)
 {
     this.AttractableBody.ClosestAttractiveBody = point.Planet.GetComponent <Physic.AttractiveBody>();
 }