Exemplo n.º 1
0
 void Start()
 {
     wc           = GameObject.Find("Bullets").GetComponent <WeaponBehaviour>();
     visionSphere = transform.GetChild(1).gameObject;
     visionSphere.transform.localScale = new Vector3(visionRange * 2, visionRange * 2, 0.01f);
     api  = GameObject.Find("Team1Controller").GetComponent <APIScript>();
     anim = GetComponentInChildren <Animator>();
     gc   = GameObject.Find("GameController").GetComponent <GameController> ();
     StartCoroutine(Timers());
     ResetStats();
 }
Exemplo n.º 2
0
    int myTeamId;       //This id is used for certain API calls and is unique for your team

    void Start()
    {
        api      = gameObject.GetComponent <APIScript> ();
        myTeamId = api.teamId;
        myUnits  = api.GetPlayers(myTeamId);
    }