The organization system

While our current setup is simple enough to look at and gives a general idea of how each piece functions, it lacks a certain level of polish in terms of organization to keep the tutorial easy to follow. As projects get larger and more complex, unless you can hold every element of a program in your head, this lack of organization can cause major headaches down the road.

Without getting into a long list of filing system best practices, just remember that, in the end, the point of organization is to keep the project maintainable and extendable.

With that in mind, along with the many other changes that we will be making, we will also be keeping an eye on better organization. By the end of this chapter, the skee Prefab will look like this:

Let's take a moment to break down the specific organization system I am using here. We will address each section and what its purpose is:

  • UI: All our user interface elements, such as TextMesh objects and buttons, will be children of this parent.
  • Skee_Ball: There are a few minor changes to this section, which we will talk about in a bit. Otherwise, this does the exact same thing it did in the previous version of the Prefab.
  • BallSpawnPoint: Here, we have our Spawn Point for the ball when the start button is pressed.
  • RampCollider: So, there was a problem with this model that caused the physics to go a bit haywire. To fix this problem, we have to add a collection of colliders that fits the model and delete the original collider. In the following image, green lines represent the collider for the selected objects:
  • TargetColliders: We also use colliders in order for the GameBalls to score points but, unlike the RampColliders, we do not want GameBalls to physically react to hitting these colliders. With a simple tick of the IsTrigger option, we now have a collider that when the ball hits it and leaves, the player's score will go up and then the ball is destroyed:
  • Static Lights: These are the lights that we have had from the beginning of this project. They are just now in a designated place.
  • MovingLightSpeedIndicator: This system is how we can determine the speed that is applied to the ball when an air-tap is registered.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.170.183