More inventory
This commit is contained in:
parent
770c4f751b
commit
015d67f490
18 changed files with 83 additions and 2 deletions
10
MoCha/Assets/Items.meta
Normal file
10
MoCha/Assets/Items.meta
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 49f84355758f7f74bbe780ac2fd1e574
|
||||||
|
folderAsset: yes
|
||||||
|
timeCreated: 1524164591
|
||||||
|
licenseType: Free
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
BIN
MoCha/Assets/Items/circle_eye.asset
Normal file
BIN
MoCha/Assets/Items/circle_eye.asset
Normal file
Binary file not shown.
10
MoCha/Assets/Items/circle_eye.asset.meta
Normal file
10
MoCha/Assets/Items/circle_eye.asset.meta
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 239bd48fa71b8fb44b79bb456aaf0807
|
||||||
|
timeCreated: 1524164723
|
||||||
|
licenseType: Free
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 11400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
BIN
MoCha/Assets/Items/circle_head.asset
Normal file
BIN
MoCha/Assets/Items/circle_head.asset
Normal file
Binary file not shown.
10
MoCha/Assets/Items/circle_head.asset.meta
Normal file
10
MoCha/Assets/Items/circle_head.asset.meta
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a921d1e60d69f1a498ba263cdfde04c7
|
||||||
|
timeCreated: 1524164686
|
||||||
|
licenseType: Free
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 11400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
BIN
MoCha/Assets/Items/crazy_hair.asset
Normal file
BIN
MoCha/Assets/Items/crazy_hair.asset
Normal file
Binary file not shown.
10
MoCha/Assets/Items/crazy_hair.asset.meta
Normal file
10
MoCha/Assets/Items/crazy_hair.asset.meta
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 642e995dbaf120642aeb269ce5c6c476
|
||||||
|
timeCreated: 1524164615
|
||||||
|
licenseType: Free
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 11400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
BIN
MoCha/Assets/Items/crown.asset
Normal file
BIN
MoCha/Assets/Items/crown.asset
Normal file
Binary file not shown.
10
MoCha/Assets/Items/crown.asset.meta
Normal file
10
MoCha/Assets/Items/crown.asset.meta
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e10fc574df6c4744cbee17e84374f524
|
||||||
|
timeCreated: 1524164707
|
||||||
|
licenseType: Free
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 11400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
BIN
MoCha/Assets/Items/gap_mouth.asset
Normal file
BIN
MoCha/Assets/Items/gap_mouth.asset
Normal file
Binary file not shown.
10
MoCha/Assets/Items/gap_mouth.asset.meta
Normal file
10
MoCha/Assets/Items/gap_mouth.asset.meta
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e59e525161ea38242a90fd6ef67f4b63
|
||||||
|
timeCreated: 1524164715
|
||||||
|
licenseType: Free
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 11400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
BIN
MoCha/Assets/Items/pig_nose.asset
Normal file
BIN
MoCha/Assets/Items/pig_nose.asset
Normal file
Binary file not shown.
10
MoCha/Assets/Items/pig_nose.asset.meta
Normal file
10
MoCha/Assets/Items/pig_nose.asset.meta
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 9c001483399829349bae2c3bf3743bc0
|
||||||
|
timeCreated: 1524164756
|
||||||
|
licenseType: Free
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 11400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
Binary file not shown.
Binary file not shown.
|
@ -7,7 +7,7 @@ public class Inventory : MonoBehaviour
|
||||||
{
|
{
|
||||||
public Image[] itemImages = new Image[numItemSlots];
|
public Image[] itemImages = new Image[numItemSlots];
|
||||||
public Item[] items = new Item[numItemSlots];
|
public Item[] items = new Item[numItemSlots];
|
||||||
public const int numItemSlots = 4;
|
public const int numItemSlots = 6;
|
||||||
public void AddItem(Item itemToAdd)
|
public void AddItem(Item itemToAdd)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < items.Length; i++)
|
for (int i = 0; i < items.Length; i++)
|
||||||
|
|
|
@ -37,6 +37,12 @@ public class MonsterManager : MonoBehaviour {
|
||||||
mouthPos.Append(GameObject.Find("gap_mouth").transform.position.x).Append(" ").Append(GameObject.Find("gap_mouth").transform.position.y).Append(" ").Append(GameObject.Find("gap_mouth").transform.position.z);
|
mouthPos.Append(GameObject.Find("gap_mouth").transform.position.x).Append(" ").Append(GameObject.Find("gap_mouth").transform.position.y).Append(" ").Append(GameObject.Find("gap_mouth").transform.position.z);
|
||||||
savedString = mouthPos.ToString();
|
savedString = mouthPos.ToString();
|
||||||
PlayerPrefs.SetString(SceneManager.GetActiveScene().name + "mouthPosition", savedString);
|
PlayerPrefs.SetString(SceneManager.GetActiveScene().name + "mouthPosition", savedString);
|
||||||
|
|
||||||
|
StringBuilder nosePos = new StringBuilder();
|
||||||
|
|
||||||
|
nosePos.Append(GameObject.Find("pig_nose").transform.position.x).Append(" ").Append(GameObject.Find("pig_nose").transform.position.y).Append(" ").Append(GameObject.Find("pig_nose").transform.position.z);
|
||||||
|
savedString = nosePos.ToString();
|
||||||
|
PlayerPrefs.SetString(SceneManager.GetActiveScene().name + "nosePosition", savedString);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void loadMonster ()
|
public void loadMonster ()
|
||||||
|
@ -66,5 +72,10 @@ public class MonsterManager : MonoBehaviour {
|
||||||
|
|
||||||
GameObject.Find("gap_mouth").transform.position = new Vector3(float.Parse(values[0]),float.Parse(values[1]),float.Parse(values[2]));
|
GameObject.Find("gap_mouth").transform.position = new Vector3(float.Parse(values[0]),float.Parse(values[1]),float.Parse(values[2]));
|
||||||
|
|
||||||
|
savedString = PlayerPrefs.GetString(SceneManager.GetActiveScene().name + "nosePosition");
|
||||||
|
values = savedString.Split(' ');
|
||||||
|
|
||||||
|
GameObject.Find("pig_nose").transform.position = new Vector3(float.Parse(values[0]),float.Parse(values[1]),float.Parse(values[2]));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
m_EditorVersion: 2017.2.1f1
|
m_EditorVersion: 2017.3.1f1
|
||||||
|
|
Reference in a new issue