allods, Да это то )Добавлено (01.01.2014, 01:38)
---------------------------------------------
Теперь мне нужно как-то узнавать ID и Имя Item-ма.Что бы делать предмет.
Вот что я написал.
Код
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class Craft : MonoBehaviour {
public Transform [] Palka;
public Transform [] Palka2;
public static List<Item> Item = new List<Item>();
public Item it;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
if(Input.GetKeyDown(KeyCode.Q)){
Palka = Palka2;
}
if(Palka == Palka2 && it.ItemName == "1"){
Instantiate(it,transform.position , transform.rotation);
}
}
}
Код
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class Item : MonoBehaviour {
public string ItemName;
public string ItemID;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
}