Ejemplo n.º 1
0
 private void UpdateReferences()
 {
     assembleLayout = GetComponentInParent <AssembleLayout>();
     NPCinfo        = GetComponent <NPCBase>();
     attackSystem   = GetComponent <AutoAttackSystem>();
     center         = assembleLayout ? assembleLayout.GetAssemblyPoint() : transform;
 }
Ejemplo n.º 2
0
 private void UpdateRefference()
 {
     NPCinfo          = GetComponent <NPCBase>();
     moveable         = GetComponent <Moveable>();
     assembleLayout   = GetComponentInParent <AssembleLayout>();
     autoAttackSystem = GetComponent <AutoAttackSystem>();
     aimBase          = GetComponent <AimBase>();
 }
Ejemplo n.º 3
0
 public void Build(GameObject towerPrefab)
 {
     if (tower)
     {
         Destroy(tower.gameObject);
     }
     if (towerPrefab)
     {
         tower = Instantiate(towerPrefab, transform).GetComponent <TowerBase>();
         AssembleLayout assemble = tower.GetComponentInChildren <AssembleLayout>();
         if (assemble)
         {
             assemble.SetAssemblyPoint(defaultPoint.position);
         }
         GameManager.Instance.money -= tower.cost;
     }
 }
Ejemplo n.º 4
0
 protected override void UpdateREF()
 {
     base.UpdateREF();
     assembleLayout = GetComponent <AssembleLayout>();
 }