|
@@ -65,6 +65,14 @@ public class CoinCreation : MonoBehaviour
|
|
{
|
|
{
|
|
//TODO Was muss beim schiefen verteilen für den Slalom angepasst werden? z.B. stepsize?
|
|
//TODO Was muss beim schiefen verteilen für den Slalom angepasst werden? z.B. stepsize?
|
|
Debug.Log("Coin-Creation: Place Coins for Slalom.");
|
|
Debug.Log("Coin-Creation: Place Coins for Slalom.");
|
|
|
|
+
|
|
|
|
+ /*
|
|
|
|
+ space_x = distance_x / stepsize;
|
|
|
|
+ space_z = distance_z / stepsize;
|
|
|
|
+ rotationVector = new Vector3(0f, 90f, 90f);
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|
|
if (distance_x > 0) // wenn entlang der x Richung verteilt wird
|
|
if (distance_x > 0) // wenn entlang der x Richung verteilt wird
|
|
{
|
|
{
|
|
@@ -82,9 +90,24 @@ public class CoinCreation : MonoBehaviour
|
|
for (int i = 0; i < stepsize; ++i)
|
|
for (int i = 0; i < stepsize; ++i)
|
|
{
|
|
{
|
|
//Coin-Position berechnen
|
|
//Coin-Position berechnen
|
|
- coin_position.x = start_point.x + i * space_x;
|
|
|
|
|
|
+ if (start_point.x - end_point.x > 0)
|
|
|
|
+ {
|
|
|
|
+ coin_position.x = start_point.x - i * space_x;
|
|
|
|
+ }
|
|
|
|
+ if (start_point.x - end_point.x <= 0)
|
|
|
|
+ {
|
|
|
|
+ coin_position.x = start_point.x + i * space_x;
|
|
|
|
+ }
|
|
|
|
+ if (start_point.z - end_point.z > 0)
|
|
|
|
+ {
|
|
|
|
+ coin_position.z = start_point.z - i * space_z;
|
|
|
|
+ }
|
|
|
|
+ if (start_point.z - end_point.z <= 0)
|
|
|
|
+ {
|
|
|
|
+ coin_position.z = start_point.z + i * space_z;
|
|
|
|
+ }
|
|
|
|
+
|
|
coin_position.y = 0.5f;
|
|
coin_position.y = 0.5f;
|
|
- coin_position.z = start_point.z + i * space_z;
|
|
|
|
|
|
|
|
//Coin erstellen
|
|
//Coin erstellen
|
|
coin = coinPool.GetItem();
|
|
coin = coinPool.GetItem();
|