예제 #1
0
        public MagicBoomerang(Vector2 loc)
        {
            Sprite = ItemSpriteFactory.Instance.MagicBoomerang();
            itemCollisionHandler = new ItemCollisionHandler(this);
            Physics        = new Physics(loc);
            PickUpItemTime = LoZGame.Instance.UpdateSpeed;
            LifeTime       = 0;
            Vector2 size = new Vector2(ItemSpriteFactory.BoomerangWidth, ItemSpriteFactory.BoomerangHeight);

            Physics.Bounds = new Rectangle((int)Physics.Location.X, (int)Physics.Location.Y, (int)size.X, (int)size.Y);
            Expired        = false;
        }
예제 #2
0
        public PowerBracelet(Vector2 loc)
        {
            Sprite = ItemSpriteFactory.Instance.PowerBracelet();
            itemCollisionHandler = new ItemCollisionHandler(this);
            Physics        = new Physics(loc);
            PickUpItemTime = LoZGame.Instance.UpdateSpeed;
            LifeTime       = 0;
            Vector2 size = new Vector2(ItemSpriteFactory.RupeeWidth * ItemSpriteFactory.Instance.Scale, ItemSpriteFactory.RupeeHeight * ItemSpriteFactory.Instance.Scale);

            Physics.Bounds = new Rectangle((int)Physics.Location.X, (int)Physics.Location.Y, (int)size.X, (int)size.Y);
            Expired        = false;
        }
예제 #3
0
파일: Rupee.cs 프로젝트: Grimnak/LoZGame
        public Rupee(Vector2 loc)
        {
            Sprite = ItemSpriteFactory.Instance.Rupee();
            itemCollisionHandler = new ItemCollisionHandler(this);
            Physics        = new Physics(loc);
            PickUpItemTime = -1;
            LifeTime       = 0;
            Vector2 size = new Vector2(ItemSpriteFactory.RupeeWidth, ItemSpriteFactory.RupeeHeight);

            Physics.Bounds = new Rectangle((int)Physics.Location.X, (int)Physics.Location.Y, (int)size.X, (int)size.Y);
            Expired        = false;
        }
예제 #4
0
        public DroppedBluePotion(Vector2 loc)
        {
            Sprite = ItemSpriteFactory.Instance.BluePotion();
            itemCollisionHandler = new ItemCollisionHandler(this);
            Physics        = new Physics(loc);
            PickUpItemTime = -1;
            LifeTime       = 0;
            Vector2 size = new Vector2(ItemSpriteFactory.RupeeWidth * ItemSpriteFactory.Instance.Scale, ItemSpriteFactory.RupeeHeight * ItemSpriteFactory.Instance.Scale);

            Physics.Bounds = new Rectangle((int)Physics.Location.X, (int)Physics.Location.Y, (int)size.X, (int)size.Y);
            Expired        = false;
            StartBob();
        }
예제 #5
0
        public HeartContainer(Vector2 loc)
        {
            Sprite               = ItemSpriteFactory.Instance.HeartContainer();
            FrameDelay           = 5;
            itemCollisionHandler = new ItemCollisionHandler(this);
            Physics              = new Physics(loc);
            PickUpItemTime       = (int)(2.5 * LoZGame.Instance.UpdateSpeed);
            LifeTime             = 0;
            Vector2 size = new Vector2(ItemSpriteFactory.HeartContainerWidth, ItemSpriteFactory.HeartContainerHeight);

            Physics.Bounds = new Rectangle((int)Physics.Location.X, (int)Physics.Location.Y, (int)size.X, (int)size.Y);
            Expired        = false;
        }
예제 #6
0
        public Fairy(Vector2 loc)
        {
            Sprite               = ItemSpriteFactory.Instance.Fairy();
            FrameDelay           = 5;
            itemCollisionHandler = new ItemCollisionHandler(this);
            Physics              = new Physics(loc);
            PickUpItemTime       = -1;
            LifeTime             = 0;
            Vector2 size = new Vector2(ItemSpriteFactory.RupeeWidth * ItemSpriteFactory.Instance.Scale, ItemSpriteFactory.RupeeHeight * ItemSpriteFactory.Instance.Scale);

            Physics.Bounds = new Rectangle((int)Physics.Location.X, (int)Physics.Location.Y, (int)size.X, (int)size.Y);
            Expired        = false;
            GetNewDirection();
        }