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; }
public object Clone() { Shock shock = new Shock(); shock.unlocked = this.unlocked; shock.unlockedAt = this.unlockedAt; return(shock); }
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; }