Skip to content

Commit

Permalink
around 0-5 magazines spawn in the structures now, and updated the can…
Browse files Browse the repository at this point in the history
…Get crosshair
  • Loading branch information
dcmrobin committed May 8, 2023
1 parent ea17849 commit 99c8127
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 6 deletions.
14 changes: 10 additions & 4 deletions Assets/Game/Scripts/WorldGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,20 @@ void GenerateWorld()
if (probability > 730)
{
GameObject simpleStructure = PhotonNetwork.Instantiate(Path.Combine("PhotonPrefabs", "SimpleStructure"), new Vector3(tile.transform.position.x + Random.Range(-tileSize/2, tileSize/2), 0, tile.transform.position.z + Random.Range(-tileSize/2, tileSize/2)), Quaternion.identity);
GameObject magazine = PhotonNetwork.Instantiate(Path.Combine("PhotonPrefabs", magazinePrefab.name), new Vector3(simpleStructure.transform.position.x, simpleStructure.transform.position.y + 1, simpleStructure.transform.position.z), Quaternion.identity);
for (int i = 0; i < Random.Range(0, 5); i++)
{
GameObject magazine = PhotonNetwork.Instantiate(Path.Combine("PhotonPrefabs", magazinePrefab.name), new Vector3(simpleStructure.transform.position.x, simpleStructure.transform.position.y + 1, simpleStructure.transform.position.z), Quaternion.identity);
}
//simpleStructure.transform.parent = new GameObject().transform.parent = tile.transform;
}
else if (probability < 730)
{
GameObject rock = Instantiate(rockPrefab, new Vector3(tile.transform.position.x + Random.Range(-tileSize/2, tileSize/2), 0, tile.transform.position.z + Random.Range(-tileSize/2, tileSize/2)), Quaternion.identity);
rock.transform.localRotation = Quaternion.Euler(0, Random.Range(0, 360), 0);
rock.transform.parent = new GameObject().transform.parent = tile.transform;
for (int i = 0; i < Random.Range(0, 10); i++)
{
GameObject rock = Instantiate(rockPrefab, new Vector3(tile.transform.position.x + Random.Range(-tileSize/2, tileSize/2), 0, tile.transform.position.z + Random.Range(-tileSize/2, tileSize/2)), Quaternion.identity);
rock.transform.localRotation = Quaternion.Euler(0, Random.Range(0, 360), 0);
rock.transform.parent = new GameObject().transform.parent = tile.transform;
}
}
}
else if (probability >= 900)
Expand Down
Binary file added Assets/Game/Sprites_Textures/canGet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Assets/Game/Sprites_Textures/cangrabby.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Assets/Game/Sprites_Textures/crosshair.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Assets/Game/Sprites_Textures/getIn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Assets/Game/Sprites_Textures/grabby.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed Assets/Game/Sprites_Textures/handaboutgrabby.png
Binary file not shown.
7 changes: 6 additions & 1 deletion Assets/Resources/PhotonPrefabs/Player.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -3758,7 +3758,7 @@ MonoBehaviour:
crosshair: {fileID: 2508726181910623241}
normalCrosshair: {fileID: 21300000, guid: bda7d8f40c0237548aaeb8dd1e5ab390, type: 3}
carCrosshair: {fileID: 21300000, guid: 653a3e740b542d54990f728dedc5faac, type: 3}
canGetCrosshair: {fileID: 21300000, guid: e6bc70991e17b704187ffef7ffb7d7b4, type: 3}
canGetCrosshair: {fileID: 21300000, guid: 7b675902f7382d940990f71ec405f09c, type: 3}
pickupableCrosshair: {fileID: 21300000, guid: e709bc4c44b02ef46a2baed2829e8c6b,
type: 3}
pickedUpCrosshair: {fileID: 21300000, guid: f52e8f132eba46b4da23f704002177d2, type: 3}
Expand Down Expand Up @@ -5370,6 +5370,11 @@ PrefabInstance:
propertyPath: m_Name
value: player
objectReference: {fileID: 0}
- target: {fileID: 5509654439515443377, guid: 1432460caed4d604d87887216094a6f1,
type: 3}
propertyPath: m_Materials.Array.data[0]
value:
objectReference: {fileID: 2100000, guid: 94915e49572581247a73ee1b05f71c0d, type: 2}
- target: {fileID: 7202271454713460447, guid: 1432460caed4d604d87887216094a6f1,
type: 3}
propertyPath: m_Materials.Array.data[0]
Expand Down

0 comments on commit 99c8127

Please sign in to comment.