comparison 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
comparison
equal deleted inserted replaced
12:b55d586dd4eb 13:e297afe0889d
1 using System.Collections;
2 using System.Collections.Generic;
3 using UnityEngine;
4
5 public class FoodItem : Item {
6
7 public int Recovery = 1;
8
9 public void SetItem (FoodItemInfo item, int index)
10 {
11 Recovery = item.Recover;
12 itemID = item.itemID;
13 }
14
15 private void OnTriggerEnter (Collider col) {
16 Player.Instance.Recovery (Recovery);
17 Destroy (this.gameObject);
18 }
19 }