Mercurial > hg > Members > kazuma > JungleforUnity
view Assets/Application/Scripts/FoodItem.cs @ 13:e297afe0889d default tip
Add Prefab.
author | Kazuma Takeda |
---|---|
date | Tue, 07 Feb 2017 20:49:26 +0900 |
parents | |
children |
line wrap: on
line source
using System.Collections; using System.Collections.Generic; using UnityEngine; public class FoodItem : Item { public int Recovery = 1; public void SetItem (FoodItemInfo item, int index) { Recovery = item.Recover; itemID = item.itemID; } private void OnTriggerEnter (Collider col) { Player.Instance.Recovery (Recovery); Destroy (this.gameObject); } }