Example #1
0
    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;
        }
    }
Example #2
0
 // Use this for initialization
 void Start()
 {
     gs = GetComponentInParent <GroundStats>();
 }