Beispiel #1
0
 private void Awake()
 {
     //Gets the mesh components attached to the prefab
     meshFilter   = prefab.GetComponent <MeshFilter>();
     meshRenderer = prefab.GetComponent <MeshRenderer>();
     builder      = GetComponent <PrimitivesBuilder>();
 }
Beispiel #2
0
    void Start()
    {
        prefab      = Resources.Load("Mesh") as GameObject;
        stripeCount = 0;
        currLevel   = 0;

        //Gets the mesh components attached to the prefab
        meshFilter   = prefab.GetComponent <MeshFilter>();
        meshRenderer = prefab.GetComponent <MeshRenderer>();
        builder      = GetComponent <PrimitivesBuilder>();

        //Spawning methods
        if (roadSet.spawnPlayer == true)
        {
            spawnPlayer();
        }
        else
        {
            CreateRoad();
        }
    }
Beispiel #3
0
 //Tried to generate the maze entirely from scratch using a Depth-First tree search
 //Did not work, maze would generate with paths leading outside of the maze boundaries
 //Could not continue with that implementation due to time constraints
 void Start()
 {
     builder = GetComponent <PrimitivesBuilder>();
     generateMaze();
 }