public void SetDefaultBehaviour() { LoopAction foo = new LoopAction(); foo.Add(new TravelAction(this, TravelAction.GetRandomPlanet(sector))); foo.Add(new WaitTimeAction(this, 7500)); AIManager = foo; overworldEvent = new DisplayFreighterMessageOE(Game); }
public void SetRandomEndPlanet() { List <GameObjectOverworld> tempList = new List <GameObjectOverworld>(); tempList.AddRange(sector.GetGameObjects()); destinationPlanet = tempList[(int)Game.random.Next(0, tempList.Count - 1)]; destination = destinationPlanet.position; overworldEvent = new DisplayFreighterMessageOE(Game); if (position == destination) { SetRandomEndPlanet(); } }