Beispiel #1
0
    public void buildSet()
    {
        //One obstacles
        Obstacle oneCube     = new Obstacle("oneCube", 0, 0, 0, GameObject.CreatePrimitive(PrimitiveType.Cube), false);
        Obstacle oneSphere   = new Obstacle("oneSphere", 0, 2, 0, GameObject.CreatePrimitive(PrimitiveType.Cube), false);
        Obstacle oneCylinder = new Obstacle("oneCylinder", 0, 4, 0, GameObject.CreatePrimitive(PrimitiveType.Cube), false);
        //Two obstacles
        Obstacle twoCube       = new Obstacle("twoCube", 2, 0, 0, GameObject.CreatePrimitive(PrimitiveType.Cube), false);
        Obstacle twoSphere     = new Obstacle("twoSphere", 2, 2, 0, GameObject.CreatePrimitive(PrimitiveType.Cube), false);
        Obstacle twoCylinder   = new Obstacle("twoCylinder", 2, 4, 0, GameObject.CreatePrimitive(PrimitiveType.Cube), false);
        Obstacle oneMcube2     = new Obstacle("twoSphere", 2, 6, 0, GameObject.CreatePrimitive(PrimitiveType.Cube), true);
        Obstacle oneMCylinder2 = new Obstacle("twoCylinder", 2, 8, 0, GameObject.CreatePrimitive(PrimitiveType.Cube), true);


        Obstacle oneMCylinder3 = new Obstacle("twoCylinder", 4, 0, 0, GameObject.CreatePrimitive(PrimitiveType.Cube), true);
        Obstacle oneMCylinder4 = new Obstacle("twoCylinder", 4, 2, 0, GameObject.CreatePrimitive(PrimitiveType.Cube), true);
        Obstacle oneMCylinder5 = new Obstacle("twoCylinder", 4, 4, 0, GameObject.CreatePrimitive(PrimitiveType.Cube), true);
        Obstacle oneMCylinder6 = new Obstacle("twoCylinder", 4, 6, 0, GameObject.CreatePrimitive(PrimitiveType.Cube), true);
        Obstacle oneMCylinder7 = new Obstacle("twoCylinder", 4, 8, 0, GameObject.CreatePrimitive(PrimitiveType.Cube), true);
        Obstacle oneMCylinder8 = new Obstacle("twoCylinder", 4, 10, 0, GameObject.CreatePrimitive(PrimitiveType.Cube), true);

        //One obSets
        //1a
        List <Obstacle> a1   = new List <Obstacle>(new Obstacle[] { oneCube });
        ObSet           oneA = new ObSet(a1, "1am", 3, "1am", 2, "1a");
        //1b
        List <Obstacle> b1   = new List <Obstacle>(new Obstacle[] { oneSphere });
        ObSet           oneB = new ObSet(b1, "1bm", 3, "1bm", 2, "1b");
        //1c
        List <Obstacle> c1   = new List <Obstacle>(new Obstacle[] { oneCylinder });
        ObSet           oneC = new ObSet(c1, "1cm", 3, "", 0, "1c");
        //Two obSets
        //2a
        List <Obstacle> a2   = new List <Obstacle>(new Obstacle[] { twoCube });
        ObSet           twoA = new ObSet(a2, "2am", 3, "", 0, "2a");
        //2b
        List <Obstacle> b2   = new List <Obstacle>(new Obstacle[] { twoSphere });
        ObSet           twoB = new ObSet(b2, "2bm", 3, "", 0, "2b");
        //2c
        List <Obstacle> c2   = new List <Obstacle>(new Obstacle[] { twoCylinder });
        ObSet           twoC = new ObSet(c2, "2cm", 3, "", 0, "2c");
        //1am
        List <Obstacle> a1m   = new List <Obstacle>(new Obstacle[] { oneMcube2 });
        ObSet           oneAm = new ObSet(a1m, "", 0, "", 0, "1am");
        //1bm
        List <Obstacle> b1m   = new List <Obstacle>(new Obstacle[] { oneMCylinder2 });
        ObSet           oneBm = new ObSet(b1m, "", 0, "", 0, "1bm");

        //Three obSets
        //1am
        List <Obstacle> a1m2   = new List <Obstacle>(new Obstacle[] { oneMCylinder3 });
        ObSet           oneAm2 = new ObSet(a1m2, "", 0, "", 0, "1am");
        //1bm
        List <Obstacle> b1m2   = new List <Obstacle>(new Obstacle[] { oneMCylinder4 });
        ObSet           oneBm2 = new ObSet(b1m2, "", 0, "", 0, "1bm");
        //1cm
        List <Obstacle> c1m2   = new List <Obstacle>(new Obstacle[] { oneMCylinder5 });
        ObSet           oneCm2 = new ObSet(c1m2, "", 0, "", 0, "1cm");
        //2am
        List <Obstacle> a2m2   = new List <Obstacle>(new Obstacle[] { oneMCylinder6 });
        ObSet           twoAm2 = new ObSet(a2m2, "", 0, "", 0, "2am");
        //2bm
        List <Obstacle> b2m2   = new List <Obstacle>(new Obstacle[] { oneMCylinder7 });
        ObSet           twoBm2 = new ObSet(b2m2, "", 0, "", 0, "2bm");
        //2cm
        List <Obstacle> c2m2   = new List <Obstacle>(new Obstacle[] { oneMCylinder8 });
        ObSet           twoCm2 = new ObSet(c2m2, "", 0, "", 0, "2cm");

        //One Level
        List <ObSet> levelOneObSets = new List <ObSet>(new ObSet[] { oneA, oneB, oneC });
        Level        levelOne       = new Level(levelOneObSets, 0, 0, 3);
        //Two Level
        List <ObSet> levelTwoObSets = new List <ObSet>(new ObSet[] { twoA, twoB, twoC, oneAm, oneBm });
        Level        levelTwo       = new Level(levelTwoObSets, 0, 0, 3);
        //Three Level
        List <ObSet> levelThreeObSets = new List <ObSet>(new ObSet[] { oneAm2, oneBm2, oneCm2, twoAm2, twoBm2, twoCm2 });
        Level        levelThree       = new Level(levelThreeObSets, 0, 0, 0);

        theGame.addLevel(levelOne);
        theGame.addLevel(levelTwo);
        theGame.addLevel(levelThree);
    }
Beispiel #2
0
	public void buildSet(){
		//One obstacles
		Obstacle oneCube = new Obstacle("oneCube",0,0,0,GameObject.CreatePrimitive(PrimitiveType.Cube),false);
		Obstacle oneSphere = new Obstacle("oneSphere",0,2,0,GameObject.CreatePrimitive(PrimitiveType.Cube),false);
		Obstacle oneCylinder = new Obstacle("oneCylinder",0,4,0,GameObject.CreatePrimitive(PrimitiveType.Cube),false);
		//Two obstacles
		Obstacle twoCube = new Obstacle("twoCube",2,0,0,GameObject.CreatePrimitive(PrimitiveType.Cube),false);
		Obstacle twoSphere = new Obstacle("twoSphere",2,2,0,GameObject.CreatePrimitive(PrimitiveType.Cube),false);
		Obstacle twoCylinder = new Obstacle("twoCylinder",2,4,0,GameObject.CreatePrimitive(PrimitiveType.Cube),false);
		Obstacle oneMcube2 = new Obstacle("twoSphere",2,6,0,GameObject.CreatePrimitive(PrimitiveType.Cube),true);
		Obstacle oneMCylinder2 = new Obstacle("twoCylinder",2,8,0,GameObject.CreatePrimitive(PrimitiveType.Cube),true);


		Obstacle oneMCylinder3 = new Obstacle("twoCylinder",4,0,0,GameObject.CreatePrimitive(PrimitiveType.Cube),true);
		Obstacle oneMCylinder4 = new Obstacle("twoCylinder",4,2,0,GameObject.CreatePrimitive(PrimitiveType.Cube),true);
		Obstacle oneMCylinder5 = new Obstacle("twoCylinder",4,4,0,GameObject.CreatePrimitive(PrimitiveType.Cube),true);
		Obstacle oneMCylinder6 = new Obstacle("twoCylinder",4,6,0,GameObject.CreatePrimitive(PrimitiveType.Cube),true);
		Obstacle oneMCylinder7 = new Obstacle("twoCylinder",4,8,0,GameObject.CreatePrimitive(PrimitiveType.Cube),true);
		Obstacle oneMCylinder8 = new Obstacle("twoCylinder",4,10,0,GameObject.CreatePrimitive(PrimitiveType.Cube),true);

		//One obSets
		//1a
		List<Obstacle> a1 = new List<Obstacle>(new Obstacle[] {oneCube});
		ObSet oneA = new ObSet (a1, "1am", 3, "1am", 2, "1a");
		//1b
		List<Obstacle> b1 = new List<Obstacle>(new Obstacle[] {oneSphere});
		ObSet oneB = new ObSet (b1, "1bm", 3, "1bm", 2, "1b");
		//1c
		List<Obstacle> c1 = new List<Obstacle>(new Obstacle[] {oneCylinder});
		ObSet oneC = new ObSet (c1, "1cm", 3, "", 0, "1c");
		//Two obSets
		//2a
		List<Obstacle> a2 = new List<Obstacle>(new Obstacle[] {twoCube});
		ObSet twoA = new ObSet (a2, "2am", 3, "", 0, "2a");
		//2b
		List<Obstacle> b2 = new List<Obstacle>(new Obstacle[] {twoSphere});
		ObSet twoB = new ObSet (b2, "2bm", 3, "", 0, "2b");
		//2c
		List<Obstacle> c2 = new List<Obstacle>(new Obstacle[] {twoCylinder});
		ObSet twoC = new ObSet (c2, "2cm", 3, "", 0, "2c");
		//1am
		List<Obstacle> a1m = new List<Obstacle>(new Obstacle[] {oneMcube2});
		ObSet oneAm = new ObSet (a1m, "", 0, "", 0, "1am");
		//1bm
		List<Obstacle> b1m = new List<Obstacle>(new Obstacle[] {oneMCylinder2});
		ObSet oneBm = new ObSet (b1m, "", 0, "", 0, "1bm");

		//Three obSets
		//1am
		List<Obstacle> a1m2 = new List<Obstacle>(new Obstacle[] {oneMCylinder3});
		ObSet oneAm2 = new ObSet (a1m2, "", 0, "", 0, "1am");
		//1bm
		List<Obstacle> b1m2 = new List<Obstacle>(new Obstacle[] {oneMCylinder4});
		ObSet oneBm2 = new ObSet (b1m2, "", 0, "", 0, "1bm");
		//1cm
		List<Obstacle> c1m2 = new List<Obstacle>(new Obstacle[] {oneMCylinder5});
		ObSet oneCm2 = new ObSet (c1m2, "", 0, "", 0, "1cm");
		//2am
		List<Obstacle> a2m2 = new List<Obstacle>(new Obstacle[] {oneMCylinder6});
		ObSet twoAm2 = new ObSet (a2m2, "", 0, "", 0, "2am");
		//2bm
		List<Obstacle> b2m2 = new List<Obstacle>(new Obstacle[] {oneMCylinder7});
		ObSet twoBm2 = new ObSet (b2m2, "", 0, "", 0, "2bm");
		//2cm
		List<Obstacle> c2m2 = new List<Obstacle>(new Obstacle[] {oneMCylinder8});
		ObSet twoCm2 = new ObSet (c2m2, "", 0, "", 0, "2cm");

		//One Level
		List<ObSet> levelOneObSets = new List<ObSet>(new ObSet[] {oneA, oneB, oneC });
		Level levelOne = new Level(levelOneObSets,0,0,3);
		//Two Level
		List<ObSet> levelTwoObSets = new List<ObSet>(new ObSet[] {twoA, twoB, twoC, oneAm, oneBm });
		Level levelTwo = new Level (levelTwoObSets, 0, 0,3);
		//Three Level
		List<ObSet> levelThreeObSets = new List<ObSet>(new ObSet[] {oneAm2, oneBm2, oneCm2, twoAm2, twoBm2, twoCm2});
		Level levelThree = new Level (levelThreeObSets, 0, 0,0);

		theGame.addLevel (levelOne);
		theGame.addLevel (levelTwo);
		theGame.addLevel (levelThree);
	}