Exemple #1
0
    public PlayerDashRobot()
    {
        motionConstants = new PlayerMotionConstants();
        playerEffects   = Substitute.For <IPlayerEffects>();

        playerDash = new PlayerDash(motionConstants, playerEffects);
    }
Exemple #2
0
 public PlayerDash(
     PlayerMotionConstants motionConstants,
     IPlayerEffects playerEffects
     )
 {
     this.motionConstants = motionConstants;
     this.playerEffects   = playerEffects;
 }
Exemple #3
0
    public PlayerMovement(
        IPlayerAnimator playerAnimator,
        IPlayerEffects playerEffects,
        Transform playerGroundCheck,
        Rigidbody2D playerRigidBody,
        Transform playerTransform,
        PlayerMotionConstants motionConstants)
    {
        this.playerAnimator    = playerAnimator;
        this.playerEffects     = playerEffects;
        this.playerGroundCheck = playerGroundCheck;
        this.playerRigidBody   = playerRigidBody;
        this.playerTransform   = playerTransform;
        this.motionConstants   = motionConstants;

        playerJump = new PlayerJump(motionConstants);
        playerDash = new PlayerDash(motionConstants, playerEffects);
    }
Exemple #4
0
 public PlayerJump(PlayerMotionConstants motionConstants)
 {
     this.motionConstants = motionConstants;
     jumpTimeLeft         = motionConstants.jumpTime;
     jumpsRemaining       = motionConstants.maxJumps;
 }
Exemple #5
0
 public PlayerJumpRobot(int maxJumps)
 {
     motionConstants = new PlayerMotionConstants(maxJumps: maxJumps);
     playerJump      = new PlayerJump(motionConstants);
 }