public Map(IRegionEntityFactory factory, string name, string author, int width, int height) : this(factory) { this.Width = width; this.Height = height; Initialize(name, author, factory); }
public MapEntity CreateEntity(IRegionEntityFactory factory, IResourceContainer resources, bool scrollAffected) { MapEntity result = null; switch (EntityType) { case EntityType.None: result = new MapEntity(factory, scrollAffected); break; case EntityType.Building: result = new BuildingEntity(factory, scrollAffected); break; case EntityType.Player: result = new PlayerEntity(factory, scrollAffected); break; case EntityType.Npc: result = new NPCEntity(factory, scrollAffected); break; case EntityType.Door: //result = new EntityDoor(); break; } if (result != null) { result.TemplateID = this.ID; } return(result); }
private void Initialize(string name, string author, IRegionEntityFactory factory) { this.Name = name ?? "MAP_NO_NAME"; this.Author = author ?? "Anonymous"; this.Behaviors = new MockupTileBehavior[Width,Height]; for (int i = 0; i < Width; i++) { for (int j = 0; j < Height; j++) { Behaviors[i, j] = new MockupTileBehavior(TileBehavior.Height2.Id); } } Fill(-1, 0); }
public MapEntity(IRegionEntityFactory factory, bool cameraAffected) : base(factory) { this.World = factory.World; this.Collidable = true; this.CameraAffected = cameraAffected; this.blendstate = BlendState.NonPremultiplied; this.Opacity = 1.0f; this.Scale = 1.0f; this.Shadow = true; this.Color = Color.White; Initialize(); }
private void Initialize(string name, string author, IRegionEntityFactory factory) { this.Name = name ?? "MAP_NO_NAME"; this.Author = author ?? "Anonymous"; this.Behaviors = new MockupTileBehavior[Width, Height]; for (int i = 0; i < Width; i++) { for (int j = 0; j < Height; j++) { Behaviors[i, j] = new MockupTileBehavior(TileBehavior.Height2.Id); } } Fill(-1, 0); }
public BuildingEntity(IRegionEntityFactory factory, bool cameraAffected) : base(factory, cameraAffected) { Initialize(); }
public MapEntity(IRegionEntityFactory factory, Map map, bool ScrollAffected) : this(factory, ScrollAffected) { this.Map = map; }
public MapEntity CreateEntity(IRegionEntityFactory factory, bool scrollAffected) { return(CreateEntity(factory, factory.World, scrollAffected)); }
public MapEntity CreateEntity(IRegionEntityFactory factory) { return(CreateEntity(factory, true)); }
public Map(IRegionEntityFactory factory) : this() { this.World = factory.World; }
public NPCEntity(IRegionEntityFactory factory, bool cameraAffected) : base(factory, cameraAffected) { }
public LivingEntity(IRegionEntityFactory factory, bool cameraAffected) : base(factory, cameraAffected) { this.Effects = new List<IEffect>(); }
public MapEntity CreateEntity(IRegionEntityFactory factory) { return CreateEntity(factory, true); }
public MapEntity CreateEntity(IRegionEntityFactory factory, bool scrollAffected) { return CreateEntity(factory, factory.World, scrollAffected); }
public MapEntity CreateEntity(IRegionEntityFactory factory, IResourceContainer resources, bool scrollAffected) { MapEntity result = null; switch (EntityType) { case EntityType.None: result = new MapEntity(factory, scrollAffected); break; case EntityType.Building: result = new BuildingEntity(factory, scrollAffected); break; case EntityType.Player: result = new PlayerEntity(factory, scrollAffected); break; case EntityType.Npc: result = new NPCEntity(factory, scrollAffected); break; case EntityType.Door: //result = new EntityDoor(); break; } if (result != null) result.TemplateID = this.ID; return result; }
public EntityIO(IBinaryIO stream, IRegionEntityFactory factory, bool ScrollAffected) { this._stream = stream; this.factory = factory; this.ScrollAffected = ScrollAffected; }
public LivingEntity(IRegionEntityFactory factory, bool cameraAffected) : base(factory, cameraAffected) { this.Effects = new List <IEffect>(); }