Esempio n. 1
0
 private void StartEarly()
 {
     myPhysMaterial  = GetComponent <Collider2D>().sharedMaterial;
     originalGravity = Physics2D.gravity;
     myRB            = GetComponent <Rigidbody2D>();
     myCol           = GetComponent <Collider2D>();
     mySH            = GameObject.FindGameObjectWithTag("StatHandler").GetComponent <StatHandler>();
     mySH.StatHandlerStart(maxTime);
     canGoLeft       = mySH.canGoLeft;
     canGoRight      = mySH.canGoRight;
     myMoveSpeed     = mySH.myMoveSpeedMult * moveSpeed;
     jumpForce       = mySH.jumpForceMult * origJumpForce;
     Physics.gravity = new Vector3(0f, mySH.gravityMultiplier * originalGravity.y, 0f);
     whichTile       = mySH.whichTileRand;
     maxTime         = mySH.timeLeft;
     timeLeft        = maxTime;
 }