Browse Source

Added fixes for veggies

master
MB 5 years ago
parent
commit
623ad818d0
10 changed files with 28 additions and 34 deletions
  1. +9
    -9
      Assets/Scipts/Map.cs
  2. +9
    -0
      Assets/Scipts/PlayerControllers/LocalPlayer.cs
  3. +1
    -0
      Assets/Scipts/VegetableSpawner.cs
  4. +0
    -8
      Assets/Shaders.meta
  5. +4
    -4
      Assets/VeggieSpots/Mushroom spot.prefab
  6. +1
    -1
      Assets/VeggieSpots/carrot_02.prefab
  7. +1
    -1
      Assets/VeggieSpots/potato_01.prefab
  8. +1
    -1
      Assets/VeggieSpots/pumpkin.prefab
  9. +0
    -8
      Assets/WorldAssets/Models.meta
  10. +2
    -2
      ProjectSettings/TagManager.asset

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

@ -80,7 +80,7 @@ public class Map : MonoBehaviour
GameObject MirrorTile = Instantiate(Tile);
MirrorTile.transform.position = newPos;
MirrorTile.transform.Rotate(Vector3.up, RandomRotation);
MirrorTile.transform.rotation = Tile.transform.rotation;
MirrorTile.name = Tile.name + "(Mirror)";
}
@ -91,7 +91,7 @@ public class Map : MonoBehaviour
GameObject MirrorTile = Instantiate(Tile);
MirrorTile.transform.position = newPos;
MirrorTile.transform.Rotate(Vector3.up, RandomRotation);
MirrorTile.transform.rotation = Tile.transform.rotation;
MirrorTile.name = Tile.name + "(Mirror)";
}
@ -103,7 +103,7 @@ public class Map : MonoBehaviour
GameObject MirrorTile = Instantiate(Tile);
MirrorTile.transform.position = newPos;
MirrorTile.transform.Rotate(Vector3.up, RandomRotation);
MirrorTile.transform.rotation = Tile.transform.rotation;
MirrorTile.name = Tile.name + "(Mirror)";
}
@ -114,7 +114,7 @@ public class Map : MonoBehaviour
GameObject MirrorTile = Instantiate(Tile);
MirrorTile.transform.position = newPos;
MirrorTile.transform.Rotate(Vector3.up, RandomRotation);
MirrorTile.transform.rotation = Tile.transform.rotation;
MirrorTile.name = Tile.name + "(Mirror)";
}
@ -125,7 +125,7 @@ public class Map : MonoBehaviour
GameObject MirrorTile = Instantiate(Tile);
MirrorTile.transform.position = newPos;
MirrorTile.transform.Rotate(Vector3.up, RandomRotation);
MirrorTile.transform.rotation = Tile.transform.rotation;
MirrorTile.name = Tile.name + "(Mirror)";
}
@ -137,7 +137,7 @@ public class Map : MonoBehaviour
GameObject MirrorTile = Instantiate(Tile);
MirrorTile.transform.position = newPos;
MirrorTile.transform.Rotate(Vector3.up, RandomRotation);
MirrorTile.transform.rotation = Tile.transform.rotation;
MirrorTile.name = Tile.name + "(Mirror)";
}
@ -149,7 +149,7 @@ public class Map : MonoBehaviour
GameObject MirrorTile = Instantiate(Tile);
MirrorTile.transform.position = newPos;
MirrorTile.transform.Rotate(Vector3.up, RandomRotation);
MirrorTile.transform.rotation = Tile.transform.rotation;
MirrorTile.name = Tile.name + "(Mirror)";
}
@ -161,7 +161,7 @@ public class Map : MonoBehaviour
GameObject MirrorTile = Instantiate(Tile);
MirrorTile.transform.position = newPos;
MirrorTile.transform.Rotate(Vector3.up, RandomRotation);
MirrorTile.transform.rotation = Tile.transform.rotation;
MirrorTile.name = Tile.name + "(Mirror)";
}
}
@ -176,7 +176,7 @@ public class Map : MonoBehaviour
if (Landmarks.Count > 0)
{
int rand = Random.Range(0, Landmarks.Count);
Instantiate(Landmarks[rand], LP.transform.position, Quaternion.identity, tile.transform);
Instantiate(Landmarks[rand], LP.transform.position, Landmarks[rand].transform.rotation, tile.transform);
Landmarks.Remove(Landmarks[rand]);
}
}

+ 9
- 0
Assets/Scipts/PlayerControllers/LocalPlayer.cs View File

@ -91,4 +91,13 @@ public class LocalPlayer : Player {
recipe.friendlyPickup(vegIn.Name, 1);
recipe.pickupItem(vegIn);
}
public void OnControllerColliderHit(ControllerColliderHit hit)
{
if (hit.gameObject.tag == "Vegetable")
{
PickupVeggie(hit.gameObject.GetComponent<VegetableSpawner>().thisVeg);
}
}
}

+ 1
- 0
Assets/Scipts/VegetableSpawner.cs View File

@ -9,6 +9,7 @@ public class VegetableSpawner : MonoBehaviour {
{
if (other.gameObject.tag == "Player")
{
Debug.Log("BUMP");
other.gameObject.GetComponent<LocalPlayer>().PickupVeggie(thisVeg);
}
}

+ 0
- 8
Assets/Shaders.meta View File

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

+ 4
- 4
Assets/VeggieSpots/Mushroom spot.prefab View File

@ -26,7 +26,7 @@ GameObject:
- component: {fileID: 54268202253157094}
m_Layer: 0
m_Name: Mushroom spot
m_TagString: Untagged
m_TagString: Vegetable
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@ -38,8 +38,8 @@ Transform:
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1920492649654550}
m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068}
m_LocalPosition: {x: -50.12228, y: 1658.2845, z: -2998.564}
m_LocalScale: {x: 2.9190772, y: 2.9190772, z: 2.9190772}
m_LocalPosition: {x: 92.727745, y: 14.364, z: 115.79399}
m_LocalScale: {x: 1.5848039, y: 1.5848039, z: 1.5848039}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
@ -127,4 +127,4 @@ MonoBehaviour:
m_EditorClassIdentifier:
thisVeg:
Name: Mushroom
Image: {fileID: 0}
Image: {fileID: 21300000, guid: fcda3393a8f19cd45947860ea3beabac, type: 3}

+ 1
- 1
Assets/VeggieSpots/carrot_02.prefab View File

@ -41,7 +41,7 @@ GameObject:
- component: {fileID: 54734235210677366}
m_Layer: 0
m_Name: carrot_02
m_TagString: Untagged
m_TagString: Vegetable
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

+ 1
- 1
Assets/VeggieSpots/potato_01.prefab View File

@ -26,7 +26,7 @@ GameObject:
- component: {fileID: 54371359018975834}
m_Layer: 0
m_Name: potato_01
m_TagString: Untagged
m_TagString: Vegetable
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

+ 1
- 1
Assets/VeggieSpots/pumpkin.prefab View File

@ -26,7 +26,7 @@ GameObject:
- component: {fileID: 54050288613722914}
m_Layer: 0
m_Name: pumpkin
m_TagString: Untagged
m_TagString: Vegetable
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

+ 0
- 8
Assets/WorldAssets/Models.meta View File

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

+ 2
- 2
ProjectSettings/TagManager.asset View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:82a52046af97890d54c8ecc9775a20133efaea10fed6aeeb250dfac8edf2a1e2
size 442
oid sha256:bb1e2bd74e8f7a5986d294e2a241f1ee2af6ed814479b1bc5b0de65da05861c7
size 453

Loading…
Cancel
Save