public void StartAiming() { _input = _player.Input; _aimIndicator.gameObject.SetActive(true); IsAiming = true; }
public void Initialize(GameplayInput gameplayInput) { //Debug.Log("Initialize input"); //TODO currently Initialize gets called AFTER this object States are created. This causes // null references for input. Determine how to send input properly when this player is spawned _gameplayInput = gameplayInput; }
public PlayerMoveState(PlayerFSM stateMachine, Player player) : base(stateMachine, player) { _stateMachine = stateMachine; _movement = player.Movement; _data = player.Data; _input = player.Input; _animator = player.PlayerAnimator; }
public PlayerBounceAttackState(PlayerFSM stateMachine, Player player) { _stateMachine = stateMachine; _animator = player.PlayerAnimator; _movement = player.Movement; _data = player.Data; _weaponSystem = player.WeaponSystem; _input = player.Input; }
public PlayerCrouchState(PlayerFSM stateMachine, Player player) : base(stateMachine, player) { _stateMachine = stateMachine; _player = player; _movement = player.Movement; _input = player.Input; _data = player.Data; _playerAnimator = player.PlayerAnimator; _ceilingDetector = player.EnvironmentDetector.CeilingDetector; }
public PlayerWallSlideState(PlayerFSM stateMachine, Player player) : base(stateMachine, player) { _stateMachine = stateMachine; _player = player; _animator = player.PlayerAnimator; _movement = player.Movement; _data = player.Data; _input = player.Input; _jumpDust = player.Visuals.JumpDust; }
public PlayerWallClimbState(PlayerFSM stateMachine, Player player) : base(stateMachine, player) { _stateMachine = stateMachine; _player = player; _movement = player.Movement; _data = player.Data; _input = player.Input; _aboveWallDetector = player.EnvironmentDetector.AboveWallDetector; _wallDetector = player.EnvironmentDetector.WallDetector; }
public PlayerWallGrab(PlayerFSM stateMachine, Player player) : base(stateMachine, player) { _stateMachine = stateMachine; _player = player; _animator = player.PlayerAnimator; _movement = player.Movement; _input = player.Input; _data = player.Data; _sfx = player.SFX; }
public PlayerGroundedSuperState(PlayerFSM stateMachine, Player player) { _stateMachine = stateMachine; _player = player; _input = player.Input; _data = player.Data; _groundDetector = player.EnvironmentDetector.GroundDetector; _ceilingDetector = player.EnvironmentDetector.CeilingDetector; _dashSystem = player.DashSystem; }
public PlayerLandState(PlayerFSM stateMachine, Player player) : base(stateMachine, player) { _stateMachine = stateMachine; _player = player; _animator = player.PlayerAnimator; _input = player.Input; _data = player.Data; _sfx = player.SFX; _dashSystem = player.DashSystem; _jumpDust = player.Visuals.JumpDust; }
public PlayerWallSuperState(PlayerFSM stateMachine, Player player) { _stateMachine = stateMachine; _player = player; _data = player.Data; _movement = player.Movement; _input = player.Input; _groundDetector = player.EnvironmentDetector.GroundDetector; _wallDetector = player.EnvironmentDetector.WallDetector; _dashSystem = player.DashSystem; }
public void Awake() { roundProcessController = new RoundProcessController(); gamePlayInput = new GameplayInput(); bmbColliderManager = new BMBColliderManager(); buffManager = new BuffManager(); autoController = new AI.AutoController(); singleBattle = new AI.BattleField(); _phaseNameText = GameObject.Find("phaseNameText").GetComponentInChildren <Text>(); _phaseNameText.color = Color.red; _phaseNameText.text = roundProcessController.State.ToString(); }
public PlayerGroundAttackState(PlayerFSM stateMachine, Player player) { _stateMachine = stateMachine; _animator = player.PlayerAnimator; _movement = player.Movement; _data = player.Data; _input = player.Input; _weaponSystem = player.WeaponSystem; _dashSystem = player.DashSystem; _weaponData = player.WeaponSystem.EquippedWeapon; _groundDetector = player.EnvironmentDetector.GroundDetector; }
public PlayerJumpState(PlayerFSM stateMachine, Player player) { _stateMachine = stateMachine; _player = player; _animator = player.PlayerAnimator; _movement = player.Movement; _input = player.Input; _data = player.Data; _groundDetector = player.EnvironmentDetector.GroundDetector; _dashSystem = player.DashSystem; _sfx = player.SFX; _jumpDust = player.Visuals.JumpDust; }
public PlayerFallingState(PlayerFSM stateMachine, Player player) { _stateMachine = stateMachine; _player = player; _animator = player.PlayerAnimator; _movement = player.Movement; _data = player.Data; _input = player.Input; _groundDetector = player.EnvironmentDetector.GroundDetector; _wallDetector = player.EnvironmentDetector.WallDetector; _aboveWallDetector = player.EnvironmentDetector.AboveWallDetector; _dashSystem = player.DashSystem; }
public bool CarryOverSpecial(bool readyForCarryover, bool handHoldActive, GameplayInput input, ConvertNestCtrl convertNestCtrl) { /* * if (readyForCarryover) { * bool hintShown = Show("showHintDragCarryover", false, Vector3.zero); * if (hintShown) { * input.EnableAllInput(false, GameplayInput.CONVERT_TO_TENS); * input.EnableCountingAndPause(true); * if (convertNestCtrl) * convertNestCtrl.ToggleVisibility(true, handHoldActive); * return true; * } * } else { * if (Session.instance.currentLevel.hasTutorial("showHintDragCarryover") && !seenMap["showHintDragCarryover"]) { * Show((Session.instance.currentLevel.tensColumnEnabled) ? "showHintDragAddOne" : "showHintDragAdd", true); * input.EnableAllInput(false, GameplayInput.ONES_QUEUE); * input.EnableCountingAndPause(true); * return true; * } * }*/ return(false); }
public void BeginLevelTutorials(GameplayInput input, ConvertNestCtrl convertNestCtrl) { FGUnity.Utils.Logger.Log("Beginning level tutorials"); bool hintShown = false; hintShown = Show(HINT_BORROW); if (hintShown) { input.EnableAllInput(false, GameplayInput.CONVERT_TO_ONES, GameplayInput.TENS_COLUMN); input.EnableCountingAndPause(true); if (convertNestCtrl) { convertNestCtrl.ShowEmptyTenFrame(true); } } hintShown = Show(HINT_SUB); if (hintShown) { input.EnableAllInput(false, GameplayInput.ONES_COLUMN, GameplayInput.ONES_SUB); input.EnableCountingAndPause(true); } hintShown = Show(HINT_SUB_ONE); if (hintShown) { input.EnableAllInput(false, GameplayInput.ONES_COLUMN, GameplayInput.ONES_SUB); input.EnableCountingAndPause(true); } hintShown = Show(HINT_SUB_TEN); if (hintShown) { input.EnableAllInput(false, GameplayInput.TENS_COLUMN, GameplayInput.TENS_SUB); input.EnableCountingAndPause(true); } }
private bool buttonPressed(string button) { return(this.LongPress ? GameplayInput.ButtonLongHeld(button) : GameplayInput.ButtonPressed(button)); }
private bool gameplayCheck() { return(GameplayInput.AnyPlayerButtonPressed(this.ToggleInput)); }
public override void Update() { if (PauseController.IsPaused()) { return; } if (!this.NoMove) { Vector2 movementAxis = GameplayInput.GetMovementAxis(this.PlayerIndex); float targetX = movementAxis.x * this.MaxSpeed; float targetY = movementAxis.y * this.MaxSpeed; float changeX = targetX - this.Velocity.x; float changeY = targetY - this.Velocity.y; if (changeX != 0 || changeY != 0) { float changeTotal = Mathf.Sqrt(Mathf.Pow(changeX, 2) + Mathf.Pow(changeY, 2)); if (changeX != 0) { float ax = Mathf.Abs(_acceleration * changeX / changeTotal); this.Velocity.x = Mathf.Lerp(this.Velocity.x, targetX, ax * Time.deltaTime / Math.Abs(changeX)); } if (changeY != 0) { float ay = Mathf.Abs(_acceleration * changeY / changeTotal); this.Velocity.y = Mathf.Lerp(this.Velocity.y, targetY, ay * Time.deltaTime / Math.Abs(changeY)); } } } else { this.Velocity = Vector2.zero; } base.Update(); // Shooting if (!this.NoFire && _weapon != null) { Vector2 rawAimAxis = GameplayInput.GetAimingAxis(this.PlayerIndex, this.transform.position, false); if (_usingController) { float aimSpeed = this.ControllerAimerSpeed; if (rawAimAxis.magnitude < 0.01f) { rawAimAxis = _aimAxis.normalized * this.ControllerMinAimAmt; aimSpeed = this.ControllerAimerSpeed * this.ControllerReturnSpeedMult; } else if (rawAimAxis.magnitude < this.ControllerMinAimAmt) { rawAimAxis = rawAimAxis.normalized * this.ControllerMinAimAmt; } _aimAxis = Vector2.MoveTowards(_aimAxis, rawAimAxis, aimSpeed * Time.deltaTime); } else { _aimAxis = rawAimAxis; } if (_aimAxis.x != 0 || _aimAxis.y != 0) { if (GameplayInput.GetFireButton(this.PlayerIndex)) { _weapon.Fire(_aimAxis.normalized, this.ShotStartDistance); } } } }
private void Awake() { _gameplayInput = new GameplayInput(); _gameplayInput.Enable(); }
public void Awake() { roundProcessController = new RoundProcessController(); gamePlayInput = new GameplayInput(); }