public PointerDistanceTrigger(CameraPointer pointer, int distanceBetweenSpawn, int spawnProbabilty) { _distanceBetweenSpawn = distanceBetweenSpawn; pointer.DistanceChanged += OnDistanceChanged; _spawnProbabilty = spawnProbabilty; }
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); }
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); } }
protected CameraState(CameraPointer controller) { this.controller = controller; }
public CameraConstruct(CameraPointer controller, BuildController build) : base(controller) { this._build = build; }
public CameraPick(CameraPointer controller) : base(controller) { }
void Start() { _cameraPointer = FindObjectOfType <CameraPointer>(); }