예제 #1
0
파일: Link.cs 프로젝트: equadon/alttp
        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));
        }
예제 #2
0
        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);
        }
예제 #3
0
파일: World.cs 프로젝트: equadon/alttp
        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 + "\".");
        }
예제 #4
0
 public GameObject(AnimationsDict animations, string currentAnimation = "")
     : this(Vector2.Zero, animations, currentAnimation)
 {
 }
예제 #5
0
파일: BlueShield.cs 프로젝트: equadon/alttp
 public BlueShield(AnimationsDict animations)
     : base(ShieldType.Fighters, animations, "/Shield/Fighters/Idle/Down")
 {
 }
예제 #6
0
파일: Character.cs 프로젝트: equadon/alttp
 public Character(Vector2 position, AnimationsDict animations, string currentAnimation = "")
     : base(position, animations, currentAnimation)
 {
 }
예제 #7
0
파일: Character.cs 프로젝트: equadon/alttp
 public Character(AnimationsDict animations, string currentAnimation = "")
     : this(Vector2.Zero, animations, currentAnimation)
 {
 }
예제 #8
0
파일: LightWorld.cs 프로젝트: equadon/alttp
 public LightWorld(Map map, AnimationsDict worldObjectAnimations, ILogger logger)
     : base(map, worldObjectAnimations, logger)
 {
 }
예제 #9
0
파일: Shield.cs 프로젝트: equadon/alttp
 public Shield(ShieldType type, AnimationsDict animations, string animationName)
     : base(animations, animationName)
 {
     Type = type;
 }
예제 #10
0
 public FireShield(AnimationsDict animations)
     : base(ShieldType.Fire, animations, "/Shield/Fire/Idle/Down")
 {
 }
예제 #11
0
 public Bush(Vector2 position, AnimationsDict animations, string currentAnimation)
     : base(position, animations, currentAnimation)
 {
 }