BlueGit

blue-star cellular-evolution

spawn second creature

timfa Tim · pushed by timfa

Authored 2021-10-16 · 5 years ago

Hash
5267963357d19bf723db3ae97382516d37bb9789
Parent
7d07d4a8
1 file changed +6 −1
src/main.js +6 −1
@@ -29,10 +29,15 @@ function gameStart()
29 29 GameAudio.init(sounds, soundsFolder);
30 30
31 31 p1 = GameObject.create(gemSpawner, GameWindow.width / 2, GameWindow.height / 2, null, 500);
32 tester = GameObject.create(creature, GameWindow.width / 2, GameWindow.height / 2, null, 500);
32 tester = GameObject.create(creature, GameWindow.width / 3, GameWindow.height / 2, null, 500);
33 33
34 34 tester.dna = GenerateNewDNA();
35 35 tester.initCells();
36
37 tester2 = GameObject.create(creature, (GameWindow.width / 3) * 2, GameWindow.height / 2, null, 500);
38
39 tester2.dna = GenerateNewDNA();
40 tester2.initCells();
36 41 }
37 42
38 43 function update(deltaTime)
@@ -29,10 +29,15 @@ function gameStart()
29 GameAudio.init(sounds, soundsFolder);
29 GameAudio.init(sounds, soundsFolder);
30
30
31 p1 = GameObject.create(gemSpawner, GameWindow.width / 2, GameWindow.height / 2, null, 500);
31 p1 = GameObject.create(gemSpawner, GameWindow.width / 2, GameWindow.height / 2, null, 500);
32 tester = GameObject.create(creature, GameWindow.width / 2, GameWindow.height / 2, null, 500);
32 tester = GameObject.create(creature, GameWindow.width / 3, GameWindow.height / 2, null, 500);
33
33
34 tester.dna = GenerateNewDNA();
34 tester.dna = GenerateNewDNA();
35 tester.initCells();
35 tester.initCells();
36
37 tester2 = GameObject.create(creature, (GameWindow.width / 3) * 2, GameWindow.height / 2, null, 500);
38
39 tester2.dna = GenerateNewDNA();
40 tester2.initCells();
36}
41}
37
42
38function update(deltaTime)
43function update(deltaTime)