Пример #1
0
 public WorldState(Application application, string scene = "")
     : base(application)
 {
     CameraManager = new CameraManager();
     World = new World(Application.Root, CameraManager, scene);
     CameraManager.CameraChanged += OnActiveCameraChanged;
 }
Пример #2
0
 public MainMenuState(Application application)
     : base(application)
 {
     CursorVisible = true;
     Camera = World.CreateCamera(new Vector3(0, 0, -5), Vector3.ZERO);
     World.WorldNode.AttachObject(Camera);
     CameraManager.ActiveCamera = Camera;
 }
Пример #3
0
        public GameState(Application application, BattleSystem battleSystem, string playerName)
            : base(application, "test_scene")
        {
            this.BattleSystem = battleSystem;
            BattleSystem.World = World;
            BattleSystem.BattleEnded += OnBattleEnded;
            World.BattleSystem = BattleSystem;
            BattleSystem.Start();

            Player = new Player(World, CameraManager, Application.WindowCenter, true);
            Player.Character = BattleSystem.GetCharacterByName(playerName);
            CameraManager.ActiveCamera = Player.Camera;
            BotManager = new BotManager(World, CameraManager, BattleSystem, new string[] { playerName }, Application.WindowCenter);

            Crosshair = new Crosshair(Application.Resolution, Player.Camera)
            {
                Character = Player.Character
            };
            UserInterface.Add(Crosshair);
            Notification = new Notification(Application.Resolution);
            UserInterface.Add(Notification);
            CursorVisible = false;
        }
Пример #4
0
 public State(Application application)
 {
     Application = application;
     UserInterface = new UserInterfaceLayer(ZOrder);
 }