コード例 #1
0
    public PostEffect AddPostEffect(PostEffectType _type)
    {
        PostEffect effect = null;

        switch (_type)
        {
        case PostEffectType.Shock:
            effect = new Shock();
            break;

        case PostEffectType.TwoScreen:
            effect = new TwoScreen();
            break;

        case PostEffectType.BulletCurtain:
            effect = new BulletCurtain();
            break;

        default:
            break;
        }

        if (effect != null)
        {
            effect.Initial();
            mPostEffectList.Add(effect);
        }

        return effect;
    }
コード例 #2
0
ファイル: Shock.cs プロジェクト: travislynn/AdventureGame
        public object Clone()
        {
            Shock shock = new Shock();

            shock.unlocked   = this.unlocked;
            shock.unlockedAt = this.unlockedAt;
            return(shock);
        }
コード例 #3
0
 private void Awake()
 {
     rigidbody_    = GetComponent <Rigidbody2D>();
     animator_     = GetComponent <Animator>();
     sprite_       = GetComponent <SpriteRenderer>();
     box_collider_ = GetComponent <BoxCollider2D>();
     Spells[0]     = new Shock().DoMagic;
     Spells[1]     = new Fireball().DoMagic;
     Spells[2]     = new AddHealth().DoMagic;
 }