public Link(Vector2 position, AnimationsDict animations, Sprite shadowSprite) : base(position, animations, "/Idle/Down") { MaxSpeed = 1.3f; Animation.Fps = 60; Shadow = new Shadow(this, shadowSprite, new Vector2(2, 15)); }
public GameObject(Vector2 position, AnimationsDict animations, string currentAnimation = "") { Animations = animations; AnimationName = currentAnimation; Position = position; Direction = new Vector2(0, 1); IsVisible = true; GameObjects.Add(this); // Retrieve a unique index Index = GetUniqueIndex(GameObjects); }
public World(Map map, AnimationsDict worldObjectAnimations, ILogger logger) { Log = logger; TileWidth = map.TileWidth; TileHeight = map.TileHeight; Width = map.Width; Height = map.Height; Log.Info("Loading \"" + GetType().Name + "\"..."); Objects = new List <GameObject> [Width, Height]; WorldObjectAnimations = worldObjectAnimations; // Layers LoadTileLayers(map); // Source tiles & tilesets SourceTiles = map.SourceTiles; Tilesets = map.Tilesets; // Load objects ObjectLayer regions = null; ObjectLayer bushes = null; // Object layers foreach (var layer in map.ObjectLayers) { if (layer.Name == "Regions") { regions = layer; } else if (layer.Name == "Bushes") { bushes = layer; } } LoadRegions(regions); LoadBushes(bushes); Log.Info("Successfully loaded \"" + GetType().Name + "\"."); }
public GameObject(AnimationsDict animations, string currentAnimation = "") : this(Vector2.Zero, animations, currentAnimation) { }
public BlueShield(AnimationsDict animations) : base(ShieldType.Fighters, animations, "/Shield/Fighters/Idle/Down") { }
public Character(Vector2 position, AnimationsDict animations, string currentAnimation = "") : base(position, animations, currentAnimation) { }
public Character(AnimationsDict animations, string currentAnimation = "") : this(Vector2.Zero, animations, currentAnimation) { }
public LightWorld(Map map, AnimationsDict worldObjectAnimations, ILogger logger) : base(map, worldObjectAnimations, logger) { }
public Shield(ShieldType type, AnimationsDict animations, string animationName) : base(animations, animationName) { Type = type; }
public FireShield(AnimationsDict animations) : base(ShieldType.Fire, animations, "/Shield/Fire/Idle/Down") { }
public Bush(Vector2 position, AnimationsDict animations, string currentAnimation) : base(position, animations, currentAnimation) { }