Hello, I am developing endless runner game in Unity 3D for Android and IOS. I have a list of prefabs (around 10 right now, but this list will increase in future). I also have a rigidbody ball which can be controlled by the player. There are four tasks.
First task is to spawn 5 prefabs from a list of all prefabs (around 10 right now) and spawner platform when the game starts (image 1 is attached). The spawner platform must be spawned at the 0;0;-15.25 coordinates. The first prefab must be spawned at the 0;0;0 coordinates. The second one must be spawned at the 0;0;22.5 coordinates. The third at the 0;0;45. This means that prefabs must be spawned every 22.5 coordinates along Z axis.
Second task is to spawn one more prefab from the list of all prefabs (around 10 right now) when the rigidbody ball enters the first prefab (image 2 is attached). Every time when rigidbody ball enters the next prefab – one more additional prefab is spawned. For instance, when rigidbody ball enters the first prefab - the sixth prefab spawns at 0;0;112.5 coordinates. This must work for infinite amount of time as it is an endless runner game (image 3 and 4 are attached). Spawned prefabs can repeat.
Third task is to remove spawner platform when the rigidbody ball enters the second prefab. Starting from the entering the third prefab the next action must be done: prefab before the previous prefab needs to be removed (image 3 and 4 are attached). This action must be done everytime rigidbody ball enters the new prefab.
Fourth task is to make score in the right-bottom angle of the screen. Each time rigidbody ball enters the next prefab – points are added to the score. The formula for the score is: points + (100 points * number of prefab). This means that each new prefab adds 100 more points than previous. For example, when rigidbody ball enters the first prefab – 100 points are added to the score (total 100 points); when rigidbody ball enters the second prefab – 200 points are added to the score (total 300 points).
Please write the scripts and also explanations how to increase amount of prefabs in future and where to implement these scripts in my project.
Hello. I'm ready to get this task done. I'd already implemented something like this. Plerase contact me to discuss the details. Best regards. Alexandr Blinov.