public static BrickFadeOutState Instance() { if (instance == null) { instance = new BrickFadeOutState(); } return(instance); }
public override void onMessage(Brick obj, StateMsg <Brick> msg) { BrickMsg type = (BrickMsg)msg.type; switch (type) { case BrickMsg.becomeTrap: obj.getSM().changeState(BrickFadeOutState.Instance()); break; } }