Example #1
0
    public void BeginShoot()
    {
        BufEffect contiShoot = LevelService.sharedService.GetBuf(BufEffectType.ContinuousShoot);

        if (contiShoot != null)
        {
            BeginIntervalShoot(1.0f / contiShoot.effectFactor);
        }
        else
        {
            Debug.Log("Shoot Once" + shootDirection);
            ShootOnce(shootDirection, shootPosition);
        }
    }
Example #2
0
    public void AddBuf(BufEffect bufEffect)
    {
        bool bufExists = false;

        foreach (BufEffect buf in bufs)
        {
            if (buf.effectType == bufEffect.effectType)
            {
                buf.effectFactor = buf.effectFactor < bufEffect.effectFactor ? bufEffect.effectFactor : buf.effectFactor;
                buf.leftTime     = bufEffect.leftTime;
                bufExists        = true;
            }
        }
        if (bufExists == false)
        {
            bufs.Add(bufEffect);
        }
    }