示例#1
0
 public void FireByPort(int portIdx)
 {
     if (_firePorts != null && _firePorts.Length != 0 && portIdx >= 0)
     {
         RangerAgent.FireBullet(_firePorts, portIdx, -1, _owner);
     }
 }
示例#2
0
 public void StopFireByPort(int portIdx)
 {
     if (_firePorts != null && _firePorts.Length != 0 && portIdx >= 0)
     {
         RangerAgent.StopFire(_firePorts[portIdx]);
     }
 }
示例#3
0
    public static void KillBulletWithFirePort(int portIdx, RangerAgent ra)
    {
        BulletList bulletListSource = ra._bulletListSource;

        FirePort[] firePorts = ra._firePorts;
        if (firePorts != null && portIdx < firePorts.Length)
        {
            if (firePorts[portIdx]._fireCount != 0)
            {
                for (int i = 0; i < firePorts[portIdx]._bulletNames.Length; i++)
                {
                    bulletListSource.KillABulletByNameAndFireport(firePorts[portIdx]._bulletNames[i], firePorts[portIdx]._portName);
                }
            }
        }
    }