示例#1
0
 public void Register(controller_mob mob)
 {
     if (_mobs.Contains(mob))
     {
         return;
     }
     _mobs.Add(mob);
 }
 void OnTriggerExit2D(Collider2D other)
 {
     if (other.gameObject.layer == game_variables.Instance.LayerMob)
     {
         controller_mob temp = other.GetComponent <controller_mob>();
         if (_targets.Contains(temp))
         {
             temp.SetSensors(true);
             _targets.Remove(temp);
         }
     }
 }
示例#3
0
 // ? override Start
 protected virtual void Initialize()
 {
     if (gameObject.layer == game_variables.Instance.LayerMob)
         _controller = GetComponent<controller_mob>();
     // 
     _equipped = null;
     // _autoPickup = false;
     // _health = 1;
     // _ammoWeapons = new int[3];
     // ? new load save
     // * testing gem ?coin ?pearl
     _collectibles = new int [5];
     // gold
     // pouch
     CollectibleModify(1, 1);
     // ammo flintlock
     CollectibleModify(2, 8);
     // ammo shotgun
     CollectibleModify(3, 4);
     // ammo saber
     CollectibleModify(4, 6);
     _invisible = false;
 }