// Update player public override void Update(GameTime gameTime) { // Do start update things StartUpdate(); // Normalized vector if (GameInput.ControllerMode) { //norm = MyMaths.Normalize(GameControlls.LeftStickX, GameControlls.LeftStickY); norm.X = GameInput.LeftStickX; norm.Y = GameInput.LeftStickY; if (Math.Abs(norm.X) > 0.70f || Math.Abs(norm.Y) > 0.70f) { norm = MyMaths.Normalize(GameInput.LeftStickX, GameInput.LeftStickY); } } else { norm = MyMaths.Normalize((GameInput.RightCD ? 1 : 0) - (GameInput.LeftCD ? 1 : 0), (GameInput.DownCD ? 1 : 0) - (GameInput.UpCD ? 1 : 0)); } // Do movement if no cutscene if (!GahameController.CutScene) { // Horizontal speed if (GameInput.RightCD || GameInput.LeftCD) { // le nice walk horizontal thing WalkHorizontal(maxSpeed * norm.X); } // Vertical speed if (GameInput.UpCD || GameInput.DownCD) { // le nice walk horizontal thing WalkVertical(maxSpeed * norm.Y); } } // Activate Object if (GameInput.ActivateCD) { // Insane if (hitBox.InstancePlace <ActivatableObject>(Position + direction) is ActivatableObject o) { o.Activate(); } else { Dialogue d = hitBox.DialogueMeeting(Position + direction); if (d != null) { d.StartDialogue(); } } screen.ScreenEffects.Add(new CameraShakeEffect(screen, 4, 20)); } // Update component last base.Update(gameTime); }