public PointerDistanceTrigger(CameraPointer pointer, int distanceBetweenSpawn,
                               int spawnProbabilty)
 {
     _distanceBetweenSpawn    = distanceBetweenSpawn;
     pointer.DistanceChanged += OnDistanceChanged;
     _spawnProbabilty         = spawnProbabilty;
 }
예제 #2
0
 public void Initialize(SightVisualFeedbackSystemDefinition sightVisualFeedbackSystemDefinition, CoreInteractiveObject associatedInteractiveObject, Camera MainCamera)
 {
     this.SightVisualFeedbackSystemDefinitionPtr = sightVisualFeedbackSystemDefinition.Allocate();
     this.AssociatedInteractiveObjectPtr         = associatedInteractiveObject.Allocate();
     this.MainCameraPtr = MainCamera.Allocate();
     this.SightVisualFeedbackGameObjectV2 =
         new SightVisualFeedbackGameObjectV2(GameObject.Instantiate(sightVisualFeedbackSystemDefinition.BaseAIStateIconPrefab,
                                                                    associatedInteractiveObject.InteractiveGameObject.InteractiveGameObjectParent.transform), sightVisualFeedbackSystemDefinition.SightVisualFeedbackAnimation);
 }
예제 #3
0
        protected override void Update(GameTime gameTime)
        {
            newKeyboardState = Keyboard.GetState();
            newGamepadState  = GamePad.GetState(PlayerIndex.One);
            MouseState       = Mouse.GetState();
            if ((newKeyboardState.IsKeyDown(Keys.P) && oldKeyboardState.IsKeyUp(Keys.P)) ||
                newGamepadState.IsButtonDown(Buttons.Start) && oldGamepadState.IsButtonUp(Buttons.Start))
            {
                if (GameStatus == GameState.Pause)
                {
                    MediaPlayer.Resume();
                    GameStatus = GameState.Playing;
                    pauseSoundEffect.Play();
                }
                else if (GameStatus == GameState.Playing)
                {
                    MediaPlayer.Pause();
                    GameStatus = GameState.Pause;
                    pauseSoundEffect.Play();
                }
            }

            if ((newKeyboardState.IsKeyDown(Keys.M) && oldKeyboardState.IsKeyUp(Keys.M)))
            {
                MouseControl   = !MouseControl;
                IsMouseVisible = !IsMouseVisible;
            }

            Cheat.Update(oldKeyboardState, newKeyboardState);

            oldKeyboardState = newKeyboardState;
            oldGamepadState  = newGamepadState;
            if (GameStatus == GameState.Playing)
            {
                this.GameTime = gameTime;
                if (!DisableControl)
                {
                    KeyboardController.Update();
                    GamepadController.Update();
                    MouseController.Update();
                    CameraPointer.UpdateX(Mario.LocationX);
                }
                MarioSprite.Update(gameTime);
                World.Update(gameTime);
                Collision_Detection_and_Responses.CollisionHandling.Update(World.Level, this);
                PlayerStat.Update(gameTime);
                base.Update(gameTime);
            }
        }
예제 #4
0
 protected CameraState(CameraPointer controller)
 {
     this.controller = controller;
 }
예제 #5
0
 public CameraConstruct(CameraPointer controller, BuildController build) : base(controller)
 {
     this._build = build;
 }
예제 #6
0
 public CameraPick(CameraPointer controller) : base(controller)
 {
 }
예제 #7
0
 void Start()
 {
     _cameraPointer = FindObjectOfType <CameraPointer>();
 }