public Glider(Player player) { _rigidbody = player.GetComponent <Rigidbody2D>(); _grounder = player.Grounder; _playerAnimator = player.AnimatorController; _glideFallVelocity = player.PlayerParameters.GlideFallVelocity; }
public BasicAttacker(Player player) { _player = player; _animatorController = player.AnimatorController; _attackDamage = _player.PlayerParameters.BasicAttackDamage; _attackLayers = _player.PlayerParameters.AttackLayers; _attackParameters = new Dictionary <Directions, AttackParameter> { { Directions.Right, _player.PlayerParameters.BasicRightAttackParameter }, { Directions.Left, _player.PlayerParameters.BasicLeftAttackParameter }, { Directions.Up, _player.PlayerParameters.BasicUpAttackParameter }, { Directions.Down, _player.PlayerParameters.BasicDownAttackParameter } }; }
public WallJumper(Player player) { _player = player; _moverTimeOff = player.PlayerParameters.WallJumpMoverTimeOff; _boxOffsetRight = player.PlayerParameters.WallJumpBoxOffsetRight; _boxOffsetLeft = player.PlayerParameters.WallJumpBoxOffsetLeft; _boxSizes = player.PlayerParameters.WallJumpBoxSizes; _layers = player.PlayerParameters.WallJumpLayers; _boxAngle = player.PlayerParameters.WallJumpBoxAngle; _fallingVelocity = player.PlayerParameters.WallPressFallingVelocity; _jumpForce = player.PlayerParameters.WallJumpForce; _rigidbody = player.GetComponent <Rigidbody2D>(); _playerAnimator = player.AnimatorController; }
private void OnValidate() { if (_playerParameters == null) { _playerParameters = Resources.Load <PlayerParameters>("ScriptableObjects/DefaultPlayerParameters"); } if (AnimatorController == null) { _playerAnimatorController = GetComponent <PlayerAnimatorController>(); } if (_ghostSpawner == null) { _ghostSpawner = GetComponent <PlayerGhostSpawner>(); } }
public StrongAttacker(Player player) { _player = player; _animatorController = player.AnimatorController; }