コード例 #1
0
 public Camera2D(ScreenManager screenManager)
 {
     ScreenManager = screenManager;
     Position = Vector2.Zero;
     ScrollDelta = 17f;
     LerpDelta = 3f;
     Zoom = 1f;
     ViewRectangle = new Rectangle(0, 0, ScreenManager.Viewport.Width, ScreenManager.Viewport.Height);
     BackgroundRectangle = new Rectangle(0, 0, ScreenManager.Viewport.Width, ScreenManager.Viewport.Height);
     CameraType = CameraType.Fixed;
 }
コード例 #2
0
        public InGameMouse(ScreenManager screenManager)
        {
            ScreenManager = screenManager;
            IsLeftClicked = false;
            IsMiddleClicked = false;
            IsRightClicked = false;
            PreviousMouseState = Mouse.GetState();
            CurrentMouseState = Mouse.GetState();

            Enable();
        }
コード例 #3
0
        public CutSceneScreen(ScreenManager screenManager, string screenDataAsset)
            : base(screenManager, screenDataAsset)
        {
            TotalRunningTime = 0;
            EventsDictionary = new Dictionary<string, Func<CutSceneEventArgs, bool>>();
            EventsDictionary.Add("Add GameObject", new Func<CutSceneEventArgs, bool>(AddGameObject));
            EventsDictionary.Add("Move GameObject", new Func<CutSceneEventArgs, bool>(Move));
            EventsDictionary.Add("Rotate GameObject", new Func<CutSceneEventArgs, bool>(Rotate));
            EventsDictionary.Add("Move Camera", new Func<CutSceneEventArgs, bool>(MoveCamera));
            EventsDictionary.Add("Remove GameObject", new Func<CutSceneEventArgs, bool>(RemoveGameObject));
            EventsDictionary.Add("Add Dialog Box", new Func<CutSceneEventArgs, bool>(AddDialogBox));
            EventsDictionary.Add("Load Next Screen", new Func<CutSceneEventArgs, bool>(LoadNextScreen));

            EventsList = new List<CutSceneEventArgs>();
            EventsToRemove = new List<CutSceneEventArgs>();
        }
コード例 #4
0
        public Screen(ScreenManager screenManager, string screenDataAsset)
        {
            ScreenManager = screenManager;

            GameObjects = new List<GameObject>();
            GameObjectsToAdd = new List<GameObject>();
            GameObjectsToRemove = new List<GameObject>();

            ScreenUIElements = new List<UIElement>();
            ScreenUIElementsToAdd = new List<UIElement>();
            ScreenUIElementsToRemove = new List<UIElement>();
            InGameUIElements = new List<UIElement>();
            InGameUIElementsToAdd = new List<UIElement>();
            InGameUIElementsToRemove = new List<UIElement>();
            Buttons = new List<Button>();

            ScreenState = ScreenState.Active;
            ScreenDataAsset = screenDataAsset;

            JustStartedUpdating = true;
        }
コード例 #5
0
 public OptionsScreen(ScreenManager screenManager, string screenDataAsset)
     : base(screenManager, screenDataAsset)
 {
 }