void GenerateObstacle() { int type = ChooseObstacleToSpawn(); switch (type) { case 0: Debug.Log("missing block"); GroundStats.MissingBlock(); break; case 1: Debug.Log("rotten tree"); GroundStats.RottenTree(); break; case 2: Debug.Log("fallen pillar"); GroundStats.FallenPillar(); break; } }
// Use this for initialization void Start() { gs = GetComponentInParent <GroundStats>(); }