Exemplo n.º 1
0
 public void AddAgent(GameObject obj, int sight, float uslope, float dslope, VisionSignal signal)
 {
     agents.Add(obj);
     agentsRadius.Add(sight);
     agentsUSlope.Add(uslope);
     agentsDSlope.Add(dslope);
     agentsT.Add(obj.GetComponent <Transform>());
     agentsAmount++;
 }
Exemplo n.º 2
0
 public void AddAgent(GameObject obj, int sight, float uslope, float dslope, VisionSignal signal)
 {
     agents.Add(obj);
     agentsRadius.Add(sight);
     agentsUSlope.Add(uslope);
     agentsDSlope.Add(dslope);
     agentsT.Add(obj.GetComponent<Transform>());
     agentsAmount++;
 }
Exemplo n.º 3
0
 private void Awake()
 {
     selection = GameObject.Find("Player Manager").GetComponent <UnitSelection>();
     vision    = gameObject.GetComponent <VisionSignal>();
     miniMap   = gameObject.GetComponent <MiniMapSignal>();
     movement  = gameObject.GetComponent <UnitMovement>();
     gui.type  = "Unit";
     gui.Awake(gameObject);
     for (int x = 0; x < techEffect.Length; x++)
     {
         var technology = Faction.Tech[techEffect[x].index];
         technology.AddListener(gameObject);
         if (technology.active)
         {
             Upgraded(technology.name);
         }
     }
     gameObject.name = name;
     healthObj       = GetComponent <Health>();
 }
 void Start()
 {
     selection = GameObject.Find("Player Manager").GetComponent<UnitSelection>();
     vision = gameObject.GetComponent<VisionSignal>();
     miniMap = gameObject.GetComponent<MiniMapSignal>();
     gui.type = "Unit";
     mGroup = GameObject.Find("Faction Manager").GetComponent<GroupManager>().groupList[group].GetComponent<Group>();
     gui.Start(gameObject);
     for(int x = 0; x < techEffect.Length; x++){
         mGroup.tech[techEffect[x].index].AddListener(gameObject);
         if(mGroup.tech[techEffect[x].index].active){
             Upgraded(mGroup.tech[techEffect[x].index].name);
         }
     }
     gameObject.name = name;
     healthObj = GetComponent<Health>();
 }