Browse Source

Fixed dummies in wrapping

master
JoshuaReason 5 years ago
parent
commit
197ca052fa
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      Assets/Scipts/Map.cs

+ 4
- 4
Assets/Scipts/Map.cs View File

@ -45,10 +45,10 @@ public class Map : MonoBehaviour
Player PS = Player.GetComponent<Player>(); Player PS = Player.GetComponent<Player>();
Transform PT = Player.transform; Transform PT = Player.transform;
Transform model = PT.Find("Model"); Transform model = PT.Find("Model");
PS.dummies.Add(Instantiate(model, new Vector3(PT.position.x + minX, PT.position.y, PT.position.z), transform.rotation, PT).gameObject);
PS.dummies.Add(Instantiate(model, new Vector3(PT.position.x + maxX, PT.position.y, PT.position.z), transform.rotation, PT).gameObject);
PS.dummies.Add(Instantiate(model, new Vector3(PT.position.x, PT.position.y, PT.position.z + minZ), transform.rotation, PT).gameObject);
PS.dummies.Add(Instantiate(model, new Vector3(PT.position.x, PT.position.y, PT.position.z + maxZ), transform.rotation, PT).gameObject);
PS.dummies.Add(Instantiate(model, new Vector3(PT.position.x + (minX - TileSize /2), PT.position.y, PT.position.z), transform.rotation, PT).gameObject);
PS.dummies.Add(Instantiate(model, new Vector3(PT.position.x + (maxX + TileSize / 2), PT.position.y, PT.position.z), transform.rotation, PT).gameObject);
PS.dummies.Add(Instantiate(model, new Vector3(PT.position.x, PT.position.y, PT.position.z + minZ - TileSize/2), transform.rotation, PT).gameObject);
PS.dummies.Add(Instantiate(model, new Vector3(PT.position.x, PT.position.y, PT.position.z + maxZ + TileSize /2), transform.rotation, PT).gameObject);
foreach (GameObject dummie in PS.dummies) foreach (GameObject dummie in PS.dummies)
{ {

Loading…
Cancel
Save