示例#1
0
 public void SetAIB(AIBase aib)
 {
     AIB = aib;
     EX  = GetComponentInChildren <General.Extender>();
     if (EX == null)
     {
         Debug.Log("No extender!");
     }
     //extendtime = (EX.maxext+ 0.02f)* EX.cooldown;
     //throw new NotImplementedException();
 }
示例#2
0
 private void Start()
 {
     G  = GetComponent <Gun>();
     MV = GetComponent <General.MoveAnimation>();
     EX = GetComponentInChildren <General.Extender>();
     if (MV == null)
     {
         Debug.Log("No mv for meleegun " + gameObject.name);
     }
     //LS = GetComponent<General.ListAnimation>();
     //RB = GetComponent<Rigidbody2D>();
     Dzones = new List <Collider2D>();
     foreach (Transform c in transform)
     {
         Collider2D[] ct = c.GetComponents <Collider2D>();
         if (ct != null)
         {
             for (int i = 0; i < ct.Length; i++)
             {
                 if (ct[i].isTrigger)
                 {
                     Dzones.Add(ct[i]);
                 }
             }
         }
     }
     if (Dzones.Count == 0)
     {
         Dzones = null; Debug.Log("No DZ for " + gameObject.name);
     }
     if (!active)
     {
         DisableAttacks();
     }
     //GetComponentInChildren<Collider2D>();
 }
示例#3
0
 private void Start()
 {
     EX = GetComponentInChildren <General.Extender>();
 }
示例#4
0
 private void Start()
 {
     //LS= GetComponent<General.ListAnimation>();
     //if (LS == null) { Debug.Log("No list animation? Its the best we have!"); }
     EX = GetComponentInChildren <General.Extender>();
 }