示例#1
0
    public void BossBulletClass(AnotherVec2 a_vcDir, float a_fSpeed, char c)
    {
        Random BbRandom = new Random();

        int nBbPosX = BbRandom.Next(10, 65);

        if (BliPool.Count == 0)
        {
            BbMake(nMAKE_DEFAULT_COUNT);
        }

        BossBullet Bbullet = BbliPool[BbliPool.Count - 1];

        BbliPool.RemoveAt(BbliPool.Count - 1);

        Bbullet.Init(4.0F, nBbPosX, 15, a_vcDir, a_fSpeed, c);
        BbliActive.Add(Bbullet);
    }
示例#2
0
    public void BossBulletUpdate(float a_fDelta)
    {
        BbliTemp.Clear();

        foreach (var val in BbliActive)
        {
            val.Update(a_fDelta);
            if (val.bIsDie == true)
            {
                val.RenderClear();
                BbliTemp.Add(val);
            }
        }

        foreach (var val in BbliTemp)
        {
            BbliActive.Remove(val);
            BbliPool.Add(val);
        }

        BbliTemp.Clear();
    }