Quantcast
Channel: Questions in topic: "enemy"
Viewing all articles
Browse latest Browse all 1488

List Other elements problems

$
0
0
using UnityEngine; using System.Collections; [System.Serializable] public class pl { public string name; public int hp,maxhp; public int attack; } using UnityEngine; using System.Collections; using System.Collections.Generic; public class player : MonoBehaviour { public pl[] pl; public List pll; void Update(){ } void OnGUI(){ if(GUILayout.Button("TIKLA")){ pll.Add(pl[0]); } } } Sorry for very bad english :( When I add list same item. When I change the name of the last item Change is happening as I have all of the same item I want to be independent of the items I need my monsters list.

Viewing all articles
Browse latest Browse all 1488

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>