Example #1
0
 public WorldState(Application application, string scene = "")
     : base(application)
 {
     CameraManager = new CameraManager();
     World = new World(Application.Root, CameraManager, scene);
     CameraManager.CameraChanged += OnActiveCameraChanged;
 }
 public CameraController(World world, CameraManager cameraManager, Point windowCenter, bool cameraEnabled)
     : base(world)
 {
     this.CameraManager = cameraManager;
     this.CameraEnabled = cameraEnabled;
     this.WindowCenter = windowCenter;
 }
Example #3
0
 public BotController(World world, CameraManager cameraManager, Point windowCenter)
     : base(world, cameraManager, windowCenter, false)
 {
     this.Strategy = new EmptyStrategy(this);
     // TODO: Remove this
     AggressionFactor = 1;
     WaitDelay = 3;
 }
Example #4
0
 public BotManager(World world, CameraManager cameraManager, BattleSystem battleSystem, string[] playerNames, Point windowCenter)
 {
     this.World = world;
     this.CameraManager = cameraManager;
     this.BattleSystem = battleSystem;
     this.PlayerNames = playerNames;
     this.WindowCenter = windowCenter;
     Reset();
 }
Example #5
0
        public World(Root root, CameraManager cameraManager, string sceneFile = "")
        {
            this.CameraManager = cameraManager;
            SceneName = sceneFile;
            Scene = root.CreateSceneManager(SceneType.ST_GENERIC);
            SearchGraph = new SearchGraph(this);
            if (sceneFile != "")
            {
                SceneLoader loader = new SceneLoader();
                List<Vector3> PathNodes = new List<Vector3>();
                loader.ParseDotScene(sceneFile, ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME, Scene, WorldNode, PathNodes, this);
                Scene.SetSkyDome(true, "SkyBoxes/CloudySky", 5, 8, 2000);
                PathNodes.ForEach(x => SearchGraph.AddVertex(x));
            }
            Scene.AmbientLight = new ColourValue(0.5f, 0.5f, 0.5f);
            Light dirLight = CreateLight(new Vector3(100, 100, 100));
            dirLight.Type = Light.LightTypes.LT_DIRECTIONAL;

            BillboardSystemManager = new Billboards.BillboardSystemManager(Scene, WorldNode);
            ParticleSystemManager = new UniqueParticleSystemManager(Scene, WorldNode);
            CompoundEffectManager = new CompoundEffects.CompoundEffectManager(this);
            SoundEngine = new SoundEngine();
        }