Example #1
0
    public void ActivateLens(ELensType lens)
    {
        LensFXObject newCurrent = null;

        switch (lens)
        {
        case ELensType.None:
            break;

        case ELensType.Flame:
            newCurrent = flame;
            break;

        case ELensType.Frost:
            newCurrent = frost;
            break;

        case ELensType.Lightning:
            newCurrent = lightning;
            break;

        default:
            break;
        }
        if (currentActive != null)
        {
            currentActive.gameObject.SetActive(false);
        }
        if (newCurrent != null)
        {
            currentActive = newCurrent;
            currentActive.gameObject.SetActive(true);
        }
    }
Example #2
0
 public Meta(EBodyType eBody, ELensType eLens, ELightType eLight)
 {
     scnt++;
     seq   = scnt;
     Body  = eBody;
     Lens  = eLens;
     Light = eLight;
 }
Example #3
0
        public static void Main(string[] args)
        {
            EBodyType  bodyType  = EBodyType.EH_BA;
            ELensType  lensType  = ELensType.EH_L1;
            ELightType lightType = ELightType.LT_CLEAR;

            PictureFile pictureFile  = new PictureFile("사진", bodyType, lensType, lightType);
            PictureFile pictureFile2 = new PictureFile("사진", bodyType, lensType, lightType);

            pictureFile.View();
            pictureFile2.View();
        }
Example #4
0
        public Meta MakeMeta(EBodyType bodyType, ELensType lensType, ELightType lightType)
        {
            foreach (var meta in metas)
            {
                if (meta.isEqual(bodyType, lensType, lightType))
                {
                    return(meta);
                }
            }

            Meta m = new Meta(bodyType, lensType, lightType);

            metas.Add(m);
            return(m);
        }
Example #5
0
    //This is gross, I know
    private void CycleAbility()
    {
        int loopSafety = 0;
        int index      = (int)currentAbility;

        while (loopSafety < 4)
        {
            index = (int)Mathf.Repeat(index + 1f, 4);
            if (attacks[index].isUnlocked)
            {
                currentAbility = (ELensType)index;
                lensFXController.ActivateLens(currentAbility);
                return;
            }
            loopSafety++;
        }
    }
Example #6
0
        public PictureFile(string name, EBodyType bodyType, ELensType lensType, ELightType lightType)
        {
            MetaPool meta_pool = MetaPool.Singleton;

            meta = meta_pool.MakeMeta(bodyType, lensType, lightType);
        }
Example #7
0
 public bool isEqual(EBodyType bodyType, ELensType lensType, ELightType lightType)
 {
     return((bodyType == Body) && (lensType == Lens) && (Light == lightType));
 }