Ejemplo n.º 1
0
 public DoodleMetaFactory(IPowerDoodle powerState, ContentManager content)
 {
     if (powerState is StandardDoodleState || powerState == null)
     {
         localFactory = new RedDoodleFactory(content);
     }
     else if (powerState is DoubleState)
     {
         localFactory = new PurpleDoodleFactory(content);
     }
     else if (powerState is SpeedState)
     {
         localFactory = new BlueDoodleFactory(content);
     }
 }
 public AbsPowerStateDoodle(DoodleObject avatar)
 {
     this.avatar   = avatar;
     factory       = new DoodleMetaFactory(this, avatar.content);
     avatar.Sprite = factory.build(avatar.moveState);
 }
Ejemplo n.º 3
0
 public AbsDoodleMoveState(DoodleObject avatar)
 {
     this.avatar   = avatar;
     factory       = new DoodleMetaFactory(avatar.powerState, avatar.content);
     avatar.Sprite = factory.build(this);
 }