mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-08-21 18:04:27 -05:00
Rigidbody Standup has been implemented
This commit is contained in:
@@ -29,11 +29,16 @@ public class InvSceneSettings : MonoBehaviour
|
||||
}
|
||||
|
||||
void Start(){
|
||||
player1.GetComponent<CapsuleCollider>().enabled = true;
|
||||
InitializeItemB();
|
||||
pointsLeft = pStats.PlayerPoints;
|
||||
pointText.text = "Points Left: " + pointsLeft;
|
||||
}
|
||||
|
||||
void FixedUpdate(){
|
||||
itemToEnable();
|
||||
}
|
||||
|
||||
private void InitializeItemB(){
|
||||
int index = 0;
|
||||
if(itemOptPrefab != null){
|
||||
@@ -82,8 +87,26 @@ public class InvSceneSettings : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Enables Script on player
|
||||
//NEEDS TO BE CLEANED UP AND IMPROVED
|
||||
public void itemToEnable(){
|
||||
if(pStats.HasBlink != player1.GetComponent<Blink>().enabled)
|
||||
player1.GetComponent<Blink>().enabled = pStats.HasBlink;
|
||||
if(pStats.HasDash != player1.GetComponent<Dash>().enabled)
|
||||
player1.GetComponent<Dash>().enabled = pStats.HasDash;
|
||||
if(pStats.HasWallrun != player1.GetComponent<WallRun>().enabled)
|
||||
player1.GetComponent<WallRun>().enabled = pStats.HasWallrun;
|
||||
if(pStats.HasGrapple != player1.GetComponent<GrapplingHook>().enabled)
|
||||
player1.GetComponent<GrapplingHook>().enabled = pStats.HasGrapple;
|
||||
if(pStats.HasNitro != player1.GetComponent<Nitro>().enabled)
|
||||
player1.GetComponent<Nitro>().enabled = pStats.HasNitro;
|
||||
|
||||
}
|
||||
|
||||
public void nextScene(){
|
||||
player1.GetComponent<PlayerMovement>().enabled = true;
|
||||
player1.GetComponent<CapsuleCollider>().enabled = false;
|
||||
player1.transform.GetChild(0).gameObject.SetActive(true);
|
||||
SceneManager.LoadScene (SceneManager.GetActiveScene().buildIndex + 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user