Browse Source

more wrapping attempts

master
JoshuaReason 5 years ago
parent
commit
dfea13d509
2 changed files with 12 additions and 4 deletions
  1. +4
    -4
      Assets/Scipts/Map.cs
  2. +8
    -0
      Assets/Shaders.meta

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

@ -45,10 +45,10 @@ public class Map : MonoBehaviour
Player PS = Player.GetComponent<Player>();
Transform PT = Player.transform;
Transform model = PT.Find("Model");
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);
PS.dummies.Add(Instantiate(model, new Vector3(PT.position.x -TileSize * MapDimensions.x, PT.position.y, PT.position.z), transform.rotation, model).gameObject);
PS.dummies.Add(Instantiate(model, new Vector3(PT.position.x + TileSize * MapDimensions.x, PT.position.y, PT.position.z), transform.rotation, model).gameObject);
PS.dummies.Add(Instantiate(model, new Vector3(PT.position.x, PT.position.y, PT.position.z - TileSize * MapDimensions.y), transform.rotation, model).gameObject);
PS.dummies.Add(Instantiate(model, new Vector3(PT.position.x, PT.position.y, PT.position.z + TileSize * MapDimensions.y), transform.rotation, model).gameObject);
foreach (GameObject dummie in PS.dummies)
{

+ 8
- 0
Assets/Shaders.meta View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f87a054963b01dc4c8aa2e3ffedcca21
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Loading…
Cancel
Save