예제 #1
0
 void Start()
 {
     rb             = GetComponent <Rigidbody2D>();
     state          = GetComponent <Player_State>();
     animator       = GetComponent <Player_Animator>();
     timers         = GetComponent <Player_Timers>();
     attributes     = state.attributes;
     speedManager   = GetComponent <Speed_Manager>();
     velocity       = speedManager.velocity;
     onGround       = state.onGround;
     onWall         = state.onWall;
     onSlope        = state.onSlope;
     onQuicksand    = state.onQuicksand;
     airborne       = state.airborne;
     control        = state.control;
     pivoting       = state.pivoting;
     dashing        = state.dashing;
     sprinting      = state.sprinting;
     input          = state.input;
     sign           = state.sign;
     prevSign       = state.prevSign;
     pivotSign      = state.pivotSign;
     pivotTimer     = timers.pivotTimer;
     momentumTimer  = timers.momentumTimer;
     moveSpeed      = attributes.moveSpeed;
     momentumFactor = attributes.momentumFactor;
     pivotTime      = attributes.pivotTime;
     momentumTime   = attributes.momentumTime;
     rb.drag        = attributes.rbDrag;
     rb.mass        = attributes.rbMass;
     gravity        = attributes.gravity;
 }
예제 #2
0
 void Start()
 {
     state                  = GetComponent <Player_State>();
     animator               = GetComponent <Player_Animator>();
     timers                 = GetComponent <Player_Timers>();
     attributes             = state.attributes;
     speedManager           = GetComponent <Speed_Manager>();
     velocity               = speedManager.velocity;
     jumpCount              = state.jumpCount;
     onGround               = state.onGround;
     onWall                 = state.onWall;
     control                = state.control;
     wantToJump             = state.wantToJump;
     wallSliding            = state.wallSliding;
     wallClimbing           = state.wallClimbing;
     wallJumping            = state.wallJumping;
     stunned                = state.stunned;
     sign                   = state.sign;
     wallSign               = state.wallSign;
     jumpBufferTimer        = timers.jumpBufferTimer;
     wallStickTimer         = timers.wallStickTimer;
     wallClimbTimer         = timers.wallClimbTimer;
     wallClimbCooldownTimer = timers.wallClimbCooldownTimer;
     wallJumpTimer          = timers.wallJumpTimer;
     wallJumpCooldownTimer  = timers.wallJumpCooldownTimer;
     moveSpeed              = attributes.moveSpeed;
     wallSlideSpeed         = attributes.wallSlideSpeed;
     wallClimbVel           = attributes.wallClimbVel;
     wallJumpVel            = attributes.wallJumpVel;
     wallStickCooldown      = attributes.wallStickCooldown;
     wallClimbCooldown      = attributes.wallClimbCooldown;
     wallClimbTime          = attributes.wallClimbTime;
     wallJumpCooldown       = attributes.wallJumpCooldown;
     wallJumpTime           = attributes.wallJumpTime;
 }
예제 #3
0
 void Start()
 {
     state             = GetComponent <Player_State>();
     animator          = GetComponent <Player_Animator>();
     timers            = GetComponent <Player_Timers>();
     attributes        = state.attributes;
     speedManager      = GetComponent <Speed_Manager>();
     leftWallCheck     = gameObject.transform.GetChild(2).gameObject.GetComponent <WallCheck>();
     rightWallCheck    = gameObject.transform.GetChild(3).gameObject.GetComponent <WallCheck>();
     velocity          = speedManager.velocity;
     onWall            = state.onWall;
     control           = state.control;
     dashing           = state.dashing;
     dashReady         = state.dashReady;
     dashAttacking     = state.dashAttacking;
     stunned           = state.stunned;
     input             = state.input;
     dashDir           = state.dashDir;
     dash              = state.dash;
     dashCooldownTimer = timers.dashCooldownTimer;
     dashAttackTimer   = timers.dashCooldownTimer;
     dashTimer         = timers.dashTimer;
     momentumTimer     = timers.momentumTimer;
     moveSpeed         = attributes.moveSpeed;
     dashSpeed         = attributes.dashSpeed;
     dashCooldownTime  = attributes.dashCooldownTime;
     dashTime          = attributes.dashTime;
     dashAttackTime    = attributes.dashAttackTime;
     momentumTime      = attributes.momentumTime;
     collisionMask     = attributes.collisionMask;
 }
예제 #4
0
 void Start()
 {
     pc           = GetComponent <Player_Con>();
     animator     = GetComponent <Player_Animator>();
     timers       = GetComponent <Player_Timers>();
     pDash        = GetComponent <Player_Dash>();
     pJump        = GetComponent <Player_Jump>();
     pDive        = GetComponent <Player_Dive>();
     pCol         = GetComponent <Player_Collisions>();
     pAttack      = GetComponent <Player_Attack>();
     wallActions  = GetComponent <Player_Wall_Actions>();
     speedManager = GetComponent <Speed_Manager>();
     ReceiveValues();
     jumpTime          = attributes.jumpTime;
     displacementTime  = attributes.displacementTime;
     pivotTime         = attributes.pivotTime;
     momentumTime      = attributes.momentumTime;
     wallStickCooldown = attributes.wallStickCooldown;
     jumpCount         = 2;
     sign         = 0.0f;
     prevSign     = 1.0f;
     wallSign     = 0.0f;
     jumpDirX     = 0.0f;
     enemyColSign = 0.0f;
     control      = true;
     airborne     = true;
     //Lines below for testing purposes
     dive       = true;
     dash       = true;
     doubleJump = true;
 }
예제 #5
0
 // Start is called before the first frame update
 void Start()
 {
     pc            = GameObject.Find("Player");
     speedManager  = pc.GetComponent <Speed_Manager>();
     state         = pc.GetComponent <Player_State>();
     animator      = pc.GetComponent <Player_Animator>();
     timers        = pc.GetComponent <Player_Timers>();
     playerManager = pc.GetComponent <PlayerManager>();
     attributes    = state.attributes;
 }
예제 #6
0
 // Start is called before the first frame update
 void Start()
 {
     player       = GameObject.Find("Player");
     speedManager = player.GetComponent <Speed_Manager>();
     state        = player.GetComponent <Player_State>();
     animator     = player.GetComponent <Player_Animator>();
     timers       = player.GetComponent <Player_Timers>();
     attributes   = state.attributes;
     deathTime    = attributes.deathTime;
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(this.gameObject);
     }
 }