rev 0.4, dev panel
This commit is contained in:
@@ -44,6 +44,26 @@ public class GameManager : MonoBehaviour
|
||||
public int hitCounter = 0;
|
||||
|
||||
public static GameManager instance;
|
||||
|
||||
public float puckMass{
|
||||
get{
|
||||
if(pucks.Count > 0){return pucks[0].rb.mass;}else{return 1f;}
|
||||
}set{
|
||||
foreach(Puck puck in pucks){
|
||||
puck.rb.mass = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public float puckDrag{
|
||||
get{
|
||||
if(pucks.Count > 0){return pucks[0].rb.linearDamping;}else{return 0f;}
|
||||
}set{
|
||||
foreach(Puck puck in pucks){
|
||||
puck.rb.linearDamping = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
void Awake()
|
||||
{
|
||||
instance = this;
|
||||
@@ -193,6 +213,8 @@ public class GameManager : MonoBehaviour
|
||||
//kickoff goal
|
||||
Debug.Log("Kickoff goal");
|
||||
StartCoroutine(CoroutineOnGoal(team,true));//true = Kickoff goal, reset only the ball
|
||||
hitCounter = 0;
|
||||
|
||||
return;
|
||||
}
|
||||
if(team == Team.Blue){
|
||||
@@ -253,7 +275,7 @@ public class GameManager : MonoBehaviour
|
||||
float resetDuration = 0.5f;
|
||||
if(!kickoff){
|
||||
foreach(Puck puck in pucks){
|
||||
puck.Reset(resetDuration);
|
||||
puck.Reset(null, resetDuration);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user