mirror of
https://github.com/DerTyp7/example-top-down-unity.git
synced 2025-10-29 12:32:09 +01:00
-Added Items
-Added item stacking -adding and removing items
This commit is contained in:
18
Assets/Player/NewBehaviourScript.cs
Normal file
18
Assets/Player/NewBehaviourScript.cs
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class NewBehaviourScript : MonoBehaviour
|
||||||
|
{
|
||||||
|
// Start is called before the first frame update
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Player/NewBehaviourScript.cs.meta
Normal file
11
Assets/Player/NewBehaviourScript.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: bb3c3ce5cbe10db4dbaaf142ba932ca3
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
8
Assets/Scripts.meta
Normal file
8
Assets/Scripts.meta
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a2d0aec177277504e9ba6d295e14334c
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
8
Assets/Scripts/Inventory.meta
Normal file
8
Assets/Scripts/Inventory.meta
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 27c09b7e7d0e7824f882a062a77737c2
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
10
Assets/Scripts/Inventory/FoodItem.cs
Normal file
10
Assets/Scripts/Inventory/FoodItem.cs
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
[CreateAssetMenu(fileName = "FoodItem", menuName = "Items/FoodItem", order = 2)]
|
||||||
|
public class FoodItem : Item
|
||||||
|
{
|
||||||
|
public int health;
|
||||||
|
public int water;
|
||||||
|
public int regeneration;
|
||||||
|
}
|
||||||
11
Assets/Scripts/Inventory/FoodItem.cs.meta
Normal file
11
Assets/Scripts/Inventory/FoodItem.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 0f6fecdcda7efd84baa350f4c41432a6
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
117
Assets/Scripts/Inventory/Inventory.cs
Normal file
117
Assets/Scripts/Inventory/Inventory.cs
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class Inventory : MonoBehaviour
|
||||||
|
{
|
||||||
|
|
||||||
|
[SerializeField]public List<Slot> inventory = new List<Slot>();
|
||||||
|
[SerializeField] int maxSize;
|
||||||
|
|
||||||
|
public List<Slot> getInventory { get => inventory; set => inventory = value; }
|
||||||
|
public void createEmptyInventory(int size)
|
||||||
|
{
|
||||||
|
inventory = new List<Slot>();
|
||||||
|
for (int i = 0; i < size; i++)
|
||||||
|
{
|
||||||
|
inventory.Add(new Slot(10));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
bool indexIsInRange(int index)
|
||||||
|
{
|
||||||
|
if (index < maxSize && index >= 0)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public int addItemAt(int index, Item itemType,int count)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (indexIsInRange(index) && (inventory[index].ItemType == null || inventory[index].ItemType.id == itemType.id))
|
||||||
|
{
|
||||||
|
if (inventory[index].ItemType == null)
|
||||||
|
{
|
||||||
|
inventory[index].ItemType = Instantiate(itemType);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (inventory[index].MaxItems == inventory[index].Count)
|
||||||
|
{
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
else if (inventory[index].MaxItems >= inventory[index].Count + count)
|
||||||
|
{
|
||||||
|
inventory[index].addItem(count);
|
||||||
|
return 0;
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
int rest = count - inventory[index].MaxItems - inventory[index].Count;
|
||||||
|
inventory[index].addItem(inventory[index].MaxItems - inventory[index].Count);
|
||||||
|
return rest;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//Wrong item or index not in range
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public int removeItemAt(int index, int count)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (inventory[index].ItemType != null && indexIsInRange(index))
|
||||||
|
{
|
||||||
|
for (int i = 0; i < count; i++)
|
||||||
|
{
|
||||||
|
if (!inventory[index].removeItem())
|
||||||
|
{
|
||||||
|
return count - i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//index not in range
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
Item findItem(Item itemType)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < items.Length; i++)
|
||||||
|
{
|
||||||
|
if (items[i] == null)
|
||||||
|
{
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
bool removeItem(Item item,int count = 1)
|
||||||
|
{
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
bool removeItemAt(int index,int count = -1)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
Item getItemAt(int index)
|
||||||
|
{
|
||||||
|
if (index < maxSize && index >= 0)
|
||||||
|
{
|
||||||
|
return items[index];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
}
|
||||||
11
Assets/Scripts/Inventory/Inventory.cs.meta
Normal file
11
Assets/Scripts/Inventory/Inventory.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ee2fcb6d299019740bbede78bbc6a1d7
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
33
Assets/Scripts/Inventory/InventoryController.cs
Normal file
33
Assets/Scripts/Inventory/InventoryController.cs
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class InventoryController : MonoBehaviour
|
||||||
|
{
|
||||||
|
[SerializeField] Item item1;// not needed
|
||||||
|
[SerializeField] Item item2;// not needed
|
||||||
|
public Inventory inventory;
|
||||||
|
[SerializeField] UI_Inventory uiInventory;
|
||||||
|
private void Awake()
|
||||||
|
{
|
||||||
|
inventory = transform.GetComponent<Inventory>();
|
||||||
|
inventory.createEmptyInventory(5);
|
||||||
|
Debug.Log(inventory.addItemAt(0, item1, 8));
|
||||||
|
Debug.Log(inventory.addItemAt(0, item1, 1));
|
||||||
|
Debug.Log(inventory.addItemAt(3, item2, 15));
|
||||||
|
Debug.Log(inventory.addItemAt(0, item2, 15));
|
||||||
|
Debug.Log(inventory.getInventory[0].Count);
|
||||||
|
|
||||||
|
uiInventory.setInventory(inventory);
|
||||||
|
}
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Scripts/Inventory/InventoryController.cs.meta
Normal file
11
Assets/Scripts/Inventory/InventoryController.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: cff3b5ce3863a7442a86b400700ff131
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
12
Assets/Scripts/Inventory/Item.cs
Normal file
12
Assets/Scripts/Inventory/Item.cs
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
[CreateAssetMenu(fileName = "Item", menuName = "Items/Item", order = 1)]
|
||||||
|
public class Item : ScriptableObject
|
||||||
|
{
|
||||||
|
public new string name;
|
||||||
|
public int id;
|
||||||
|
public bool isStackable;
|
||||||
|
public Sprite sprite;
|
||||||
|
}
|
||||||
11
Assets/Scripts/Inventory/Item.cs.meta
Normal file
11
Assets/Scripts/Inventory/Item.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: de55e2e3081d4ee4a9d0737e718a5b3b
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
19
Assets/Scripts/Inventory/ItemAtlas.cs
Normal file
19
Assets/Scripts/Inventory/ItemAtlas.cs
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class ItemAtlas : MonoBehaviour
|
||||||
|
{
|
||||||
|
public static ItemAtlas Instance { get; private set; }
|
||||||
|
|
||||||
|
private void Awake()
|
||||||
|
{
|
||||||
|
Instance = this;
|
||||||
|
}
|
||||||
|
enum ItemTypes {
|
||||||
|
STONE,TOMATO
|
||||||
|
|
||||||
|
}
|
||||||
|
public Sprite stoneSprite;
|
||||||
|
public Sprite woodSprite;
|
||||||
|
}
|
||||||
11
Assets/Scripts/Inventory/ItemAtlas.cs.meta
Normal file
11
Assets/Scripts/Inventory/ItemAtlas.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 362c4fe8229e41c46b489ad07bfa9133
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
8
Assets/Scripts/Inventory/Items.meta
Normal file
8
Assets/Scripts/Inventory/Items.meta
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: db274161008cc6a4a8c92d42b6a81832
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
18
Assets/Scripts/Inventory/Items/Stone.asset
Normal file
18
Assets/Scripts/Inventory/Items/Stone.asset
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!114 &11400000
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: de55e2e3081d4ee4a9d0737e718a5b3b, type: 3}
|
||||||
|
m_Name: Stone
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
name: Stone
|
||||||
|
id: 0
|
||||||
|
isStackable: 1
|
||||||
|
sprite: {fileID: 21300000, guid: 475f050511847c0499c1ca4f47fcaefa, type: 3}
|
||||||
8
Assets/Scripts/Inventory/Items/Stone.asset.meta
Normal file
8
Assets/Scripts/Inventory/Items/Stone.asset.meta
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e04039a6cbed5e5439b605aeee90485f
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 11400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
21
Assets/Scripts/Inventory/Items/Tomato.asset
Normal file
21
Assets/Scripts/Inventory/Items/Tomato.asset
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!114 &11400000
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 0f6fecdcda7efd84baa350f4c41432a6, type: 3}
|
||||||
|
m_Name: Tomato
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
name: Tomato
|
||||||
|
id: 1
|
||||||
|
isStackable: 1
|
||||||
|
sprite: {fileID: 21300000, guid: 5ee3152fa9663e94092921b0bd6b4821, type: 3}
|
||||||
|
health: 15
|
||||||
|
water: 10
|
||||||
|
regeneration: 2
|
||||||
8
Assets/Scripts/Inventory/Items/Tomato.asset.meta
Normal file
8
Assets/Scripts/Inventory/Items/Tomato.asset.meta
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a29513e23691eb0408e3b0e1a8e99148
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 11400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
43
Assets/Scripts/Inventory/Slot.cs
Normal file
43
Assets/Scripts/Inventory/Slot.cs
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class Slot
|
||||||
|
{
|
||||||
|
|
||||||
|
Item item;
|
||||||
|
int maxItems;
|
||||||
|
int count;
|
||||||
|
public Slot(int maxItems)
|
||||||
|
{
|
||||||
|
item = null;
|
||||||
|
this.maxItems = maxItems;
|
||||||
|
count = 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
public bool removeItem()
|
||||||
|
{
|
||||||
|
if (count > 0)
|
||||||
|
{
|
||||||
|
count--;
|
||||||
|
if (count == 0)
|
||||||
|
{
|
||||||
|
item = null;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public bool addItem(int count = 1)
|
||||||
|
{
|
||||||
|
this.count += count;
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}
|
||||||
|
public Item ItemType { get => item; set => item = value; }
|
||||||
|
public int Count { get => count; set => count = value; }
|
||||||
|
public int MaxItems { get => maxItems; set => maxItems = value; }
|
||||||
|
}
|
||||||
11
Assets/Scripts/Inventory/Slot.cs.meta
Normal file
11
Assets/Scripts/Inventory/Slot.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 497c0b5449a4c3141b273db4d97546c3
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
46
Assets/Scripts/Inventory/UI_Inventory.cs
Normal file
46
Assets/Scripts/Inventory/UI_Inventory.cs
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
public class UI_Inventory : MonoBehaviour
|
||||||
|
{
|
||||||
|
Inventory playerInventory;
|
||||||
|
public Transform inventoryContainer;
|
||||||
|
public Transform itemSlotTemplate;
|
||||||
|
private void Awake()
|
||||||
|
{
|
||||||
|
//itemSlotTemplate = inventoryContainer.Find("containerTemplate");
|
||||||
|
}
|
||||||
|
public void setInventory(Inventory inventory)
|
||||||
|
{
|
||||||
|
playerInventory = inventory;
|
||||||
|
updateInventory();
|
||||||
|
}
|
||||||
|
private void updateInventory()
|
||||||
|
{
|
||||||
|
int x = 0;
|
||||||
|
int y = 0;
|
||||||
|
float slotSize = 100;
|
||||||
|
foreach (Slot slot in playerInventory.getInventory)
|
||||||
|
{
|
||||||
|
RectTransform itemSlotRectTransform = Instantiate(itemSlotTemplate, inventoryContainer).GetComponent<RectTransform>();
|
||||||
|
itemSlotRectTransform.anchoredPosition = new Vector2(x* slotSize,y * slotSize);
|
||||||
|
itemSlotRectTransform.gameObject.SetActive(true);
|
||||||
|
|
||||||
|
|
||||||
|
if (slot.ItemType != null)
|
||||||
|
{
|
||||||
|
Transform Item = itemSlotRectTransform.Find("ItemTemplate");
|
||||||
|
Item.gameObject.SetActive(true);
|
||||||
|
Item.GetComponent<Image>().sprite = slot.ItemType.sprite;
|
||||||
|
}
|
||||||
|
x++;
|
||||||
|
if (x > 3)
|
||||||
|
{
|
||||||
|
x = 0;
|
||||||
|
y--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Scripts/Inventory/UI_Inventory.cs.meta
Normal file
11
Assets/Scripts/Inventory/UI_Inventory.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 2270781166138a84fa19eefc3f92bda6
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
8
Assets/Sprites.meta
Normal file
8
Assets/Sprites.meta
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 8b539477124253f4e94a4d2de537faf5
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
BIN
Assets/Sprites/Stein.png
Normal file
BIN
Assets/Sprites/Stein.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
122
Assets/Sprites/Stein.png.meta
Normal file
122
Assets/Sprites/Stein.png.meta
Normal file
@@ -0,0 +1,122 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 475f050511847c0499c1ca4f47fcaefa
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 11
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 0
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
vTOnly: 0
|
||||||
|
ignoreMasterTextureLimit: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: 1
|
||||||
|
aniso: 1
|
||||||
|
mipBias: 0
|
||||||
|
wrapU: 1
|
||||||
|
wrapV: 1
|
||||||
|
wrapW: 1
|
||||||
|
nPOTScale: 0
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 1
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 1
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 8
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
flipbookRows: 1
|
||||||
|
flipbookColumns: 1
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
ignorePngGamma: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 32
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Standalone
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Server
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID: 5e97eb03825dee720800000000000000
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
nameFileIdTable: {}
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
BIN
Assets/Sprites/Tomato.png
Normal file
BIN
Assets/Sprites/Tomato.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
98
Assets/Sprites/Tomato.png.meta
Normal file
98
Assets/Sprites/Tomato.png.meta
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5ee3152fa9663e94092921b0bd6b4821
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 11
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 0
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
vTOnly: 0
|
||||||
|
ignoreMasterTextureLimit: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: 1
|
||||||
|
aniso: 1
|
||||||
|
mipBias: 0
|
||||||
|
wrapU: 1
|
||||||
|
wrapV: 1
|
||||||
|
wrapW: 1
|
||||||
|
nPOTScale: 0
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 1
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 1
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 8
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
flipbookRows: 1
|
||||||
|
flipbookColumns: 1
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
ignorePngGamma: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID: 5e97eb03825dee720800000000000000
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
nameFileIdTable: {}
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
BIN
Assets/Sprites/box.png
Normal file
BIN
Assets/Sprites/box.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 719 B |
98
Assets/Sprites/box.png.meta
Normal file
98
Assets/Sprites/box.png.meta
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: dcd161e8a16b2c54690556131edbedde
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 11
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 0
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
vTOnly: 0
|
||||||
|
ignoreMasterTextureLimit: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: 1
|
||||||
|
aniso: 1
|
||||||
|
mipBias: 0
|
||||||
|
wrapU: 1
|
||||||
|
wrapV: 1
|
||||||
|
wrapW: 1
|
||||||
|
nPOTScale: 0
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 1
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 1
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 8
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
flipbookRows: 1
|
||||||
|
flipbookColumns: 1
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
ignorePngGamma: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID: 5e97eb03825dee720800000000000000
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
nameFileIdTable: {}
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Reference in New Issue
Block a user