Example #1
0
    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
    }
Example #2
0
 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);
     }
 }
Example #3
0
    // Use this for initialization
    void Start ()
    {
        playerCont = FindObjectOfType<PlayerCont>();
        
	}
Example #4
0
 void Start()
 {
     PlayerCont.Init();
     Invoke(nameof(AfterGen), 0.1f);
 }
Example #5
0
 void Start()
 {
     player    = GetComponent <PlayerCont> ();
     swipeCont = GameObject.Find("GameManager").GetComponent <SwipeController> ();
 }