void Start() { player = GameObject.Find("Player").GetComponent <PlayerCont> (); //PC controls currentMousePos = GrabCursor(); lastMousePos = currentMousePos; currentVelocity = Vector3.Distance(currentMousePos, lastMousePos); walking = true; //start off by walking }
public void setLeaderboard(XmlNodeList player, List <PlayerCont> List) { foreach (XmlNode playerInfo in player) { PlayerCont p = new PlayerCont(); p.rank = Convert.ToInt32(playerInfo.SelectSingleNode("rank").InnerText); p.name = playerInfo.SelectSingleNode("name").InnerText; p.faction = playerInfo.SelectSingleNode("faction").InnerText; p.level = Convert.ToInt32(playerInfo.SelectSingleNode("level").InnerText); p.exp = Convert.ToInt32(playerInfo.SelectSingleNode("exp").InnerText); Debug.Log(p.ToString() + '\n'); List.Add(p); } }
// Use this for initialization void Start () { playerCont = FindObjectOfType<PlayerCont>(); }
void Start() { PlayerCont.Init(); Invoke(nameof(AfterGen), 0.1f); }
void Start() { player = GetComponent <PlayerCont> (); swipeCont = GameObject.Find("GameManager").GetComponent <SwipeController> (); }