[200~
This commit is contained in:
parent
05fcd17618
commit
595c5c4b22
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 5c741c4d068619344a3e34e1a352d64b
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 18906e0d14b4849448eb63ddd09e4f5f
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 57975bed53103674291bed4602b12f03
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 0e46cfcdccd19f145a485a489ac6d072
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: eaa582e1c7ae46b46869cf09bfe48dc0
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 4736df418d82ce346baffcb35f1807f6
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 55d7e84284c5299489973477b29d9ea1
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 40f32ad70335b6043b2197f3ed7bb64e
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 8504e037e12f7f447b28bd369185f166
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: c79a6cbe08269e647ac6ef99ee85173a
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: b40bc90553027a4428365fe9e0df128d
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 147e163ede9beb34fb999c4a636f1b94
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: a4f411128826bae4c8b1c847000dfe8c
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 0d3ae93cb811ae449876214caa44b476
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 32feeb0af8e5895449b8f58944051699
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: e1027cbd82e54d944b0c0bd9bacb6294
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: c113e73eb85290248966d38f6fa27420
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 8170ea60c9a2c714d870372fb89c306f
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -8,6 +8,8 @@ namespace SimpleInventorySystem
|
|||||||
{
|
{
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
public bool hasBeenLooted = false;
|
public bool hasBeenLooted = false;
|
||||||
|
public bool itemsHaveBeenInstantiated = false;
|
||||||
|
public bool itemsHaveBeenHidden = false;
|
||||||
public List<GameObject> prefabs;
|
public List<GameObject> prefabs;
|
||||||
[HideInInspector] public List<ItemUI> itemUIs;
|
[HideInInspector] public List<ItemUI> itemUIs;
|
||||||
|
|
||||||
@ -21,7 +23,14 @@ namespace SimpleInventorySystem
|
|||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
|
if(hasBeenLooted && itemsHaveBeenInstantiated && itemsHaveBeenHidden)
|
||||||
|
{
|
||||||
|
foreach(ItemUI item in itemUIs)
|
||||||
|
{
|
||||||
|
item.pickUp.ItemGameObject.SetActive(false);
|
||||||
|
}
|
||||||
|
itemsHaveBeenHidden = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -61,6 +70,7 @@ namespace SimpleInventorySystem
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
hasBeenLooted = true;
|
hasBeenLooted = true;
|
||||||
|
itemsHaveBeenInstantiated = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -80,6 +80,12 @@ namespace SimpleInventorySystem
|
|||||||
{
|
{
|
||||||
if(keepOldPosition)
|
if(keepOldPosition)
|
||||||
ItemGameObject.transform.localPosition = oldPosition;
|
ItemGameObject.transform.localPosition = oldPosition;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ItemGameObject.transform.SetParent(null);
|
||||||
|
ItemGameObject.transform.position = InventorySystem.instance.player.transform.position;
|
||||||
|
//ItemGameObject.transform.position += new Vector3(0, 5, 0);
|
||||||
|
}
|
||||||
ItemGameObject.transform.localRotation = Quaternion.Euler(oldRotation);
|
ItemGameObject.transform.localRotation = Quaternion.Euler(oldRotation);
|
||||||
ItemGameObject.transform.localScale = oldScale;
|
ItemGameObject.transform.localScale = oldScale;
|
||||||
HadPickedUp = false;
|
HadPickedUp = false;
|
||||||
|
@ -309,6 +309,7 @@ namespace SimpleInventorySystem
|
|||||||
if (!fitImageInSlot)
|
if (!fitImageInSlot)
|
||||||
{
|
{
|
||||||
ApplyRectTransformResize();
|
ApplyRectTransformResize();
|
||||||
|
transform.localRotation = Quaternion.Euler(0, 0, 0); // TODO: Fix this so it maintains rotation later
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 26f808e8ee3809c43867c1c1eb226124
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 932332605b143de408257962fa7ff175
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -94,7 +94,7 @@ MeshCollider:
|
|||||||
m_IsTrigger: 0
|
m_IsTrigger: 0
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
serializedVersion: 4
|
serializedVersion: 4
|
||||||
m_Convex: 0
|
m_Convex: 1
|
||||||
m_CookingOptions: 30
|
m_CookingOptions: 30
|
||||||
m_Mesh: {fileID: 4655282791947955488, guid: 72cae44e962df3a4896638ab8c58acc2, type: 3}
|
m_Mesh: {fileID: 4655282791947955488, guid: 72cae44e962df3a4896638ab8c58acc2, type: 3}
|
||||||
--- !u!54 &2837587625851033403
|
--- !u!54 &2837587625851033403
|
||||||
|
@ -94,7 +94,7 @@ MeshCollider:
|
|||||||
m_IsTrigger: 0
|
m_IsTrigger: 0
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
serializedVersion: 4
|
serializedVersion: 4
|
||||||
m_Convex: 0
|
m_Convex: 1
|
||||||
m_CookingOptions: 30
|
m_CookingOptions: 30
|
||||||
m_Mesh: {fileID: -7733177412915393809, guid: ed3d4f7457d15d64f830c808f43fb8f8, type: 3}
|
m_Mesh: {fileID: -7733177412915393809, guid: ed3d4f7457d15d64f830c808f43fb8f8, type: 3}
|
||||||
--- !u!54 &-680508808644807951
|
--- !u!54 &-680508808644807951
|
||||||
|
@ -94,7 +94,7 @@ MeshCollider:
|
|||||||
m_IsTrigger: 0
|
m_IsTrigger: 0
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
serializedVersion: 4
|
serializedVersion: 4
|
||||||
m_Convex: 0
|
m_Convex: 1
|
||||||
m_CookingOptions: 30
|
m_CookingOptions: 30
|
||||||
m_Mesh: {fileID: 7257425601051093692, guid: 7149a4e24ecd2fd4982a2d4c603f3e13, type: 3}
|
m_Mesh: {fileID: 7257425601051093692, guid: 7149a4e24ecd2fd4982a2d4c603f3e13, type: 3}
|
||||||
--- !u!54 &-1971369510736052038
|
--- !u!54 &-1971369510736052038
|
||||||
|
@ -110,7 +110,7 @@ MeshCollider:
|
|||||||
m_IsTrigger: 0
|
m_IsTrigger: 0
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
serializedVersion: 4
|
serializedVersion: 4
|
||||||
m_Convex: 0
|
m_Convex: 1
|
||||||
m_CookingOptions: 30
|
m_CookingOptions: 30
|
||||||
m_Mesh: {fileID: 3536730544227461034, guid: d37815b9bc7c2d440b738908a8c018f3, type: 3}
|
m_Mesh: {fileID: 3536730544227461034, guid: d37815b9bc7c2d440b738908a8c018f3, type: 3}
|
||||||
--- !u!1001 &2045453797898116437
|
--- !u!1001 &2045453797898116437
|
||||||
|
@ -110,7 +110,7 @@ MeshCollider:
|
|||||||
m_IsTrigger: 0
|
m_IsTrigger: 0
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
serializedVersion: 4
|
serializedVersion: 4
|
||||||
m_Convex: 0
|
m_Convex: 1
|
||||||
m_CookingOptions: 30
|
m_CookingOptions: 30
|
||||||
m_Mesh: {fileID: 5339251737395312810, guid: 3e0a9c1b01ae5de44949f898a5808ab0, type: 3}
|
m_Mesh: {fileID: 5339251737395312810, guid: 3e0a9c1b01ae5de44949f898a5808ab0, type: 3}
|
||||||
--- !u!1001 &7854409540325217258
|
--- !u!1001 &7854409540325217258
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 34df9cfc25be6f547a48b9abf4422566
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: b4313c97c87b0da42b32b9465a89e002
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 9b0c4bb5983488a438c06d5e35e09d2b
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: f0b4fd9f8be79d34ba1fb5abecbb4aca
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,7 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 7032d000d3add4948ae9729fff4b493a
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,7 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 9bd692981c3b41e4e9c65dd7cdb03cb8
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: d61d18c239646e24ea7563da992aedaf
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: c310a300a0358f94f81e0eeb585d6cf4
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
Loading…
Reference in New Issue
Block a user