Exemplo n.º 1
0
        public override bool DrawInternal(SpriteBatch3D spriteBatch, Vector3 drawPosition, MouseOverList mouseOverList, Map map, bool roofHideFlag)
        {
            int displayItemdID = 0x4e20 + Effect.FramesActive;

            if (displayItemdID > 0x4e29)
            {
                return(false);
            }

            if (displayItemdID != m_DisplayItemID)
            {
                m_DisplayItemID = displayItemdID;

                IResourceProvider provider = ServiceRegistry.GetService <IResourceProvider>();
                DrawTexture = provider.GetUITexture(displayItemdID);

                Point offset = s_Offsets[m_DisplayItemID - 20000];
                DrawArea = new Rectangle(offset.X, DrawTexture.Height - 33 + (Entity.Z * 4) + offset.Y, DrawTexture.Width, DrawTexture.Height);
                PickType = PickType.PickNothing;
                DrawFlip = false;
            }

            // Update hue vector.
            HueVector = Utility.GetHueVector(Entity.Hue);

            return(base.Draw(spriteBatch, drawPosition, mouseOverList, map, roofHideFlag));
        }
Exemplo n.º 2
0
        public override bool Draw(SpriteBatch3D spriteBatch, Vector3 drawPosition, MouseOverList mouseOverList, Map map)
        {
            if (!AllowDefer)
            {
                if (CheckDefer(map, drawPosition))
                {
                    return(false);
                }
            }
            else
            {
                AllowDefer = false;
            }

            int displayItemdID = 0x4e20 + Effect.FramesActive;

            if (displayItemdID != m_DisplayItemID)
            {
                m_DisplayItemID = displayItemdID;
                DrawTexture     = IO.GumpData.GetGumpXNA(displayItemdID);
                Point offset = m_Offsets[m_DisplayItemID - 20000];
                DrawArea = new Rectangle(offset.X, DrawTexture.Height - 33 + (Entity.Z * 4) + offset.Y, DrawTexture.Width, DrawTexture.Height);
                PickType = PickType.PickNothing;
                DrawFlip = false;
            }

            // Update hue vector.
            HueVector = Utility.GetHueVector(Entity.Hue);

            return(base.Draw(spriteBatch, drawPosition, mouseOverList, map));
        }
Exemplo n.º 3
0
        public override bool Draw(SpriteBatch3D spriteBatch, Vector3 position, MouseOverList objectList)
        {
            if (!AllowedToDraw || GameObject.IsDisposed)
            {
                return(false);
            }
            Tile tile = (Tile)GameObject;

            if (_needUpdateStrechedTile)
            {
                UpdateStreched(World.Map);
                _needUpdateStrechedTile = false;
            }

            if (Texture == null || Texture.IsDisposed)
            {
                if (tile.IsStretched)
                {
                    Texture = TextmapTextures.GetTextmapTexture(tile.TileData.TexID);
                }
                else
                {
                    Texture = Art.GetLandTexture(GameObject.Graphic);
                    Bounds  = new Rectangle(0, GameObject.Position.Z * 4, 44, 44);
                }
            }



            HueVector = RenderExtentions.GetHueVector(GameObject.Hue);

            return(!tile.IsStretched ? base.Draw(spriteBatch, position, objectList) : Draw3DStretched(spriteBatch, position, objectList));
        }
Exemplo n.º 4
0
        public override bool Draw(SpriteBatch3D spriteBatch, Vector3 position, MouseOverList objectList)
        {
#if !ORIONSORT
            PreDraw(position);
#endif
            return(DrawInternal(spriteBatch, position, objectList));
        }
Exemplo n.º 5
0
        public override bool Draw(SpriteBatch3D spriteBatch, Vector3 drawPosition, MouseOverList mouseOverList, Map map)
        {
            if (Entity.NoDraw)
            {
                return(false);
            }

            // Update Display texture, if necessary.
            if (Entity.DisplayItemID != m_DisplayItemID)
            {
                m_DisplayItemID = Entity.DisplayItemID;
                DrawTexture     = UltimaData.ArtData.GetStaticTexture(m_DisplayItemID);
                DrawArea        = new Rectangle(DrawTexture.Width / 2 - 22, DrawTexture.Height - 44 + (Entity.Z * 4), DrawTexture.Width, DrawTexture.Height);
                PickType        = PickType.PickObjects;
                DrawFlip        = false;
            }

            // Update hue vector.
            HueVector = Utility.GetHueVector(Entity.Hue);

            bool drawn = base.Draw(spriteBatch, drawPosition, mouseOverList, map);

            DrawOverheads(spriteBatch, drawPosition, mouseOverList, map, (int)DrawArea.Y - 22);

            return(drawn);
        }
Exemplo n.º 6
0
        protected override void OnMove()
        {
            Point         position = Location;
            SpriteBatch3D sb       = Service.Get <SpriteBatch3D>();

            if (position.X + Width - BORDER_WIDTH > sb.GraphicsDevice.Viewport.Width)
            {
                position.X = sb.GraphicsDevice.Viewport.Width - (Width - BORDER_WIDTH);
            }

            if (position.X < -BORDER_WIDTH)
            {
                position.X = -BORDER_WIDTH;
            }

            if (position.Y + Height - BORDER_HEIGHT > sb.GraphicsDevice.Viewport.Height)
            {
                position.Y = sb.GraphicsDevice.Viewport.Height - (Height - BORDER_HEIGHT);
            }

            if (position.Y < -BORDER_HEIGHT)
            {
                position.Y = -BORDER_HEIGHT;
            }
            Location = position;
            _settings.GameWindowX = position.X;
            _settings.GameWindowY = position.Y;
        }
        public override bool Draw(SpriteBatch3D spriteBatch, Vector3 drawPosition, MouseOverList mouseOverList, Map map)
        {
            if (!m_AllowDefer)
            {
                if (CheckDefer(map, drawPosition))
                {
                    return(false);
                }
            }
            else
            {
                m_AllowDefer = false;
            }

            int displayItemdID = (m_Animated) ? Effect.ItemID + ((Effect.FramesActive / m_AnimData.FrameInterval) % m_AnimData.FrameCount) : Effect.ItemID;

            if (displayItemdID != m_DisplayItemID)
            {
                m_DisplayItemID = displayItemdID;
                IResourceProvider provider = ServiceRegistry.GetService <IResourceProvider>();
                DrawTexture = provider.GetItemTexture(m_DisplayItemID);
                DrawArea    = new Rectangle(DrawTexture.Width / 2 - 22, DrawTexture.Height - IsometricRenderer.TILE_SIZE_INTEGER + (Entity.Z * 4), DrawTexture.Width, DrawTexture.Height);
                PickType    = PickType.PickNothing;
                DrawFlip    = false;
            }

            // Update hue vector.
            HueVector = Utility.GetHueVector(Entity.Hue);

            return(base.Draw(spriteBatch, drawPosition, mouseOverList, map));
        }
Exemplo n.º 8
0
        public override bool Draw(SpriteBatch3D spriteBatch, Vector3 drawPosition, MouseOverList mouseOverList, Map map)
        {
            if (!AllowDefer)
            {
                if (CheckDefer(map, drawPosition))
                {
                    return(false);
                }
            }
            else
            {
                AllowDefer = false;
            }

            int displayItemdID = (m_Animated) ? Effect.ItemID + ((Effect.FramesActive / m_AnimData.FrameInterval) % m_AnimData.FrameCount) : Effect.ItemID;

            if (displayItemdID != m_DisplayItemID)
            {
                m_DisplayItemID = displayItemdID;
                DrawTexture     = IO.ArtData.GetStaticTexture(m_DisplayItemID);
                DrawArea        = new Rectangle(DrawTexture.Width / 2 - 22, DrawTexture.Height - 44 + (Entity.Z * 4), DrawTexture.Width, DrawTexture.Height);
                PickType        = PickType.PickNothing;
                DrawFlip        = false;
            }

            // Update hue vector.
            HueVector = Utility.GetHueVector(Entity.Hue);

            return(base.Draw(spriteBatch, drawPosition, mouseOverList, map));
        }
Exemplo n.º 9
0
        protected override void Draw(GameTime gameTime)
        {
            Profiler.EndFrame();
            Profiler.BeginFrame();
            if (Profiler.InContext("OutOfContext"))
            {
                Profiler.ExitContext("OutOfContext");
            }
            Profiler.EnterContext("RenderFrame");

            if (!IsMinimized)
            {
                SpriteBatch3D.Reset();
                GraphicsDevice.Clear(Color.Black);

                ActiveModel.GetView()
                .Draw(gameTime.ElapsedGameTime.TotalMilliseconds);
                UserInterface.Draw(gameTime.ElapsedGameTime.TotalMilliseconds);
            }

            Profiler.ExitContext("RenderFrame");
            Profiler.EnterContext("OutOfContext");

            UpdateWindowCaption(gameTime);
        }
Exemplo n.º 10
0
        private bool Draw3DStretched(SpriteBatch3D spriteBatch, Vector3 drawPosition, MouseOverList mouseOverList, Map map)
        {
            // this is an isometric stretched tile and needs a specialized draw routine.
            m_vertexBufferAlternate[0].Position = drawPosition + m_vertex0_yOffset;
            m_vertexBufferAlternate[1].Position = drawPosition + m_vertex1_yOffset;
            m_vertexBufferAlternate[2].Position = drawPosition + m_vertex2_yOffset;
            m_vertexBufferAlternate[3].Position = drawPosition + m_vertex3_yOffset;

            if (!spriteBatch.Draw(DrawTexture, m_vertexBufferAlternate, s_Technique))
            {
                return(false);
            }

            if ((mouseOverList.PickType & PickType) == PickType)
            {
                if (mouseOverList.IsMouseInObjectIsometric(m_vertexBufferAlternate))
                {
                    MouseOverItem item = new MouseOverItem(DrawTexture, m_vertexBufferAlternate[0].Position, Entity);
                    item.Vertices = new Vector3[4] {
                        m_vertexBufferAlternate[0].Position, m_vertexBufferAlternate[1].Position, m_vertexBufferAlternate[2].Position, m_vertexBufferAlternate[3].Position
                    };
                    mouseOverList.Add2DItem(item);
                }
            }

            return(true);
        }
Exemplo n.º 11
0
        public override bool Draw(SpriteBatch3D spriteBatch, Vector3 drawPosition, MouseOverList mouseOverList, Map map)
        {
            if (!m_AllowDefer)
            {
                if (CheckDefer(map, drawPosition))
                {
                    return(false);
                }
            }
            else
            {
                m_AllowDefer = false;
            }

            int displayItemdID = (m_Animated) ? Effect.ItemID + ((Effect.FramesActive / m_AnimData.FrameInterval) % m_AnimData.FrameCount) : Effect.ItemID;

            if (displayItemdID != m_DisplayItemID)
            {
                m_DisplayItemID = displayItemdID;
                DrawTexture     = UltimaData.ArtData.GetStaticTexture(m_DisplayItemID);
                DrawArea        = new Rectangle(DrawTexture.Width / 2 - 22, DrawTexture.Height - 44, DrawTexture.Width, DrawTexture.Height);
                PickType        = PickType.PickNothing;
                DrawFlip        = false;
            }

            DrawArea.X = 0 - (int)((Entity.Position.X_offset - Entity.Position.Y_offset) * 22);
            DrawArea.Y = 0 + (int)((Entity.Position.Z_offset + Entity.Z) * 4) - (int)((Entity.Position.X_offset + Entity.Position.Y_offset) * 22);

            Rotation = Effect.AngleToTarget;

            // Update hue vector.
            HueVector = Utility.GetHueVector(Entity.Hue);

            return(base.Draw(spriteBatch, drawPosition, mouseOverList, map));
        }
Exemplo n.º 12
0
        public override void Update(double totalMS, double frameMS)
        {
            SpriteBatch3D sb = ServiceRegistry.GetService <SpriteBatch3D>();

            if (m_Background.Width != sb.GraphicsDevice.Viewport.Width || m_Background.Height != sb.GraphicsDevice.Viewport.Height)
            {
                m_Background.Width  = sb.GraphicsDevice.Viewport.Width;
                m_Background.Height = sb.GraphicsDevice.Viewport.Height;
            }

            if (Characters.UpdateValue != m_charListUpdate)
            {
                int entryIndex = 0;
                m_characterNames = new HtmlGumpling[Characters.Length];
                foreach (CharacterListEntry e in Characters.List)
                {
                    if (e.Name != string.Empty)
                    {
                        m_characterNames[entryIndex] = new HtmlGumpling(this, 228, 154 + 40 * entryIndex, 272, 22, 0, 0, formatHTMLCharName(entryIndex, e.Name, (m_charSelected == entryIndex ? 431 : 1278)));
                        AddControl(new ResizePic(this, m_characterNames[entryIndex]), 1);
                        AddControl(m_characterNames[entryIndex], 1);
                    }
                    entryIndex++;
                }
                m_charListUpdate = Characters.UpdateValue;
            }
            base.Update(totalMS, frameMS);
        }
Exemplo n.º 13
0
        public override bool Draw(SpriteBatch3D spriteBatch, Vector3 position, MouseOverList objectList)
        {
            if (!AllowedToDraw || GameObject.IsDisposed)
            {
                return(false);
            }
            Tile tile = (Tile)GameObject;

            if (Texture == null || Texture.IsDisposed)
            {
                if (tile.IsStretched)
                {
                    Texture = TextmapTextures.GetTextmapTexture(tile.TileData.TexID);
                }
                else
                {
                    Texture = Art.GetLandTexture(GameObject.Graphic);
                    Bounds  = new Rectangle(0, 0, 44, 44);
                }
            }

            if (tile.IsStretched)
            {
                HueVector = GetHueVector(GameObject.Hue, true);

                return(Draw3DStretched(spriteBatch, position, objectList));
            }

            HueVector = GetHueVector(GameObject.Hue, false);

            return(base.Draw(spriteBatch, position, objectList));
        }
Exemplo n.º 14
0
        private static void DrawOverheads(SpriteBatch3D spriteBatch, MouseOverList objectList)
        {
            if (_overheadsList.Count > 0)
            {
                for (int i = 0; i < _overheadsList.Count; i++)
                {
                    OverHeadInfo t    = _overheadsList[i];
                    View         view = t.View;

                    Rectangle rect0 = new Rectangle((int)t.Position.X - view.Bounds.X, (int)t.Position.Y - view.Bounds.Y, view.Bounds.Width, view.Bounds.Height);

                    for (int j = i + 1; j < _overheadsList.Count; j++)
                    {
                        var  a = _overheadsList[j];
                        View b = a.View;

                        Rectangle rect1 = new Rectangle((int)a.Position.X - b.Bounds.X, (int)a.Position.Y - b.Bounds.Y, b.Bounds.Width, b.Bounds.Height);

                        if ((((TextOverhead)view.GameObject).IsOverlapped = rect0.InRect(rect1)))
                        {
                            break;
                        }
                    }

                    view.Draw(spriteBatch, t.Position, objectList);
                }

                _overheadsList.Clear();
            }
        }
Exemplo n.º 15
0
        public override bool DrawInternal(SpriteBatch3D spriteBatch, Vector3 position, MouseOverList objectList)
        {
            if (GameObject.IsDisposed)
            {
                return(false);
            }
            MovingEffect effect = (MovingEffect)GameObject;

            position.X += effect.Offset.X;
            position.Y += effect.Offset.Y + effect.Offset.Z;



            if (effect.AnimationGraphic != _displayedGraphic || Texture == null || Texture.IsDisposed)
            {
                _displayedGraphic = effect.AnimationGraphic;
                Texture           = Art.GetStaticTexture(effect.AnimationGraphic);
                Bounds            = new Rectangle(0, 0, Texture.Width, Texture.Height);
                //Bounds = new Rectangle(Texture.Width / 2 - 22, Texture.Height - 44, Texture.Width, Texture.Height);
            }

            //Bounds.X = (int)-effect.Offset.X;
            //Bounds.Y = (int)(effect.Offset.Z - effect.Offset.Y);

            //Bounds.X = -(int) ((effect.Offset.X - effect.Offset.Y) * 22);
            //Bounds.Y = (int) ((effect.Offset.Z * 4 /*- effect.Position.Z * 4*/ ) ) - (int) ((effect.Offset.X + effect.Offset.Y) * 22);
            Rotation  = effect.AngleToTarget;
            HueVector = RenderExtentions.GetHueVector(GameObject.Hue);

            return(base.Draw(spriteBatch, position, objectList));
        }
Exemplo n.º 16
0
        public override bool Draw(SpriteBatch3D spriteBatch, Vector3 position, MouseOverList objectList)
        {
            if (!AllowedToDraw || GameObject.IsDisposed)
            {
                return(false);
            }

            Static st = (Static)GameObject;

            if (st.Effect == null)
            {
                if (Texture == null || Texture.IsDisposed)
                {
                    Texture = Art.GetStaticTexture(GameObject.Graphic);
                    Bounds  = new Rectangle(Texture.Width / 2 - 22, Texture.Height - 44, Texture.Width, Texture.Height);
                }

                float alpha = 0;

                if (TileData.IsFoliage((long)st.ItemData.Flags))
                {
                    bool check = World.Player.Position.X <= st.Position.X && World.Player.Position.Y <= st.Position.Y;

                    if (!check)
                    {
                        check = World.Player.Position.Y <= st.Position.Y && World.Player.Position.X <= st.Position.X + 1;

                        if (!check)
                        {
                            check = World.Player.Position.X <= st.Position.X && World.Player.Position.Y <= st.Position.Y + 1;
                        }
                    }

                    if (check)
                    {
                        //Rectangle fol = Bounds;
                        //fol.X = (int) position.X - Bounds.X;
                        //fol.Y = (int) position.Y - Bounds.Y;

                        //Rectangle prect = World.Player.View.Bounds;
                        //prect.X += (int) World.Player.DrawX;
                        //prect.Y += (int) World.Player.DrawY;

                        //if (fol.Contains(prect))
                        //{
                        //    alpha = .6f;
                        //}
                    }
                }

                HueVector = RenderExtentions.GetHueVector(GameObject.Hue, false, alpha, false);
                MessageOverHead(spriteBatch, position, Bounds.Y - 22);

                return(base.Draw(spriteBatch, position, objectList));
            }

            return(!st.Effect.IsDisposed && st.Effect.View.Draw(spriteBatch, position, objectList));
        }
Exemplo n.º 17
0
 public static void Render(SpriteBatch3D spriteBatch, MouseOverList mouseOver, Map map, bool roofHideFlag)
 {
     if (_views.Count > 0)
     {
         for (var i = 0; i < _views.Count; i++)
             _views[i].View.Draw(spriteBatch, _views[i].DrawPosition, mouseOver, map, roofHideFlag);
         _views.Clear();
     }
 }
Exemplo n.º 18
0
 /// <summary>
 /// Draws all overheads, starting at [yOffset] pixels above the Entity's anchor point on the ground.
 /// </summary>
 /// <param name="yOffset"></param>
 public void DrawOverheads(SpriteBatch3D spriteBatch, Vector3 drawPosition, MouseOverList mouseOverList, Map map, int yOffset)
 {
     for (int i = 0; i < Entity.Overheads.Count; i++)
     {
         AEntityView view = Entity.Overheads[i].GetView();
         view.DrawArea = new Rectangle((view.DrawTexture.Width / 2) - 22, yOffset + view.DrawTexture.Height, view.DrawTexture.Width, view.DrawTexture.Height);
         OverheadRenderer.AddView(view, drawPosition);
         yOffset += view.DrawTexture.Height;
     }
 }
Exemplo n.º 19
0
 /// <summary>
 /// Draws all overheads, starting at [yOffset] pixels above the Entity's anchor point on the ground.
 /// </summary>
 /// <param name="yOffset"></param>
 public void DrawOverheads(SpriteBatch3D spriteBatch, Vector3 drawPosition, MouseOverList mouseOverList, Map map, int yOffset)
 {
     foreach (var tile in Entity.Overheads)
     {
         var view = tile.GetView();
         view.DrawArea = new Rectangle((view.DrawTexture.Width / 2) - 22, yOffset + view.DrawTexture.Height, view.DrawTexture.Width, view.DrawTexture.Height);
         OverheadRenderer.AddView(view, drawPosition);
         yOffset += view.DrawTexture.Height;
     }
 }
Exemplo n.º 20
0
        public void Initialize()
        {
            _spriteBatch = UltimaServices.GetService <SpriteBatch3D>();

            //_vertexBufferStretched = new [] {
            //    new VertexPositionNormalTextureHue(new Vector3(), new Vector3(),  new Vector3(0, 0, 0)),
            //    new VertexPositionNormalTextureHue(new Vector3(), new Vector3(),  new Vector3(1, 0, 0)),
            //    new VertexPositionNormalTextureHue(new Vector3(), new Vector3(),  new Vector3(0, 1, 0)),
            //    new VertexPositionNormalTextureHue(new Vector3(), new Vector3(),  new Vector3(1, 1, 0))
            //};
        }
Exemplo n.º 21
0
        public override bool Draw(SpriteBatch3D spriteBatch, Vector3 position, MouseOverList objectList)
        {
#if !ORIONSORT
            if (!((AnimatedItemEffect)GameObject).IsItemEffect)
            {
                PreDraw(position);
            }
#endif

            return(DrawInternal(spriteBatch, position, objectList));
        }
Exemplo n.º 22
0
        public override bool Draw(SpriteBatch3D spriteBatch, Vector3 position, MouseOverList objectList)
        {
            DamageOverhead dmg = (DamageOverhead)GameObject;

            if (dmg.MovingTime >= 50)
            {
                dmg.MovingTime = 0;
                dmg.OffsetY   -= 2;
            }

            return(base.Draw(spriteBatch, position, objectList));
        }
Exemplo n.º 23
0
        public static void Render(SpriteBatch3D spriteBatch, MouseOverList mouseOverList, Map map)
        {
            if (m_Views.Count > 0)
            {
                for (int i = 0; i < m_Views.Count; i++)
                {
                    m_Views[i].View.Draw(spriteBatch, m_Views[i].DrawPosition, mouseOverList, map);
                }

                m_Views.Clear();
            }
        }
Exemplo n.º 24
0
        public static void Draw(SpriteBatch3D spriteBatch, MouseOverList objectList)
        {
            if (_views.Count > 0)
            {
                for (int i = 0; i < _views.Count; i++)
                {
                    ViewWithDrawInfo v = _views[i];
                    v.View.Draw(spriteBatch, v.DrawPosition, objectList);
                }

                _views.Clear();
            }
        }
Exemplo n.º 25
0
        private static void DrawDamages(SpriteBatch3D spriteBatch, MouseOverList objectList)
        {
            if (_damagesList.Count > 0)
            {
                for (int i = 0; i < _damagesList.Count; i++)
                {
                    var t = _damagesList[i];
                    t.View.Draw(spriteBatch, t.Position, objectList);
                }

                _damagesList.Clear();
            }
        }
Exemplo n.º 26
0
 public override bool Draw(SpriteBatch3D spriteBatch, Vector3 drawPosition, MouseOverList mouseOverList, Map map)
 {
     if (Entity is Mobile)
     {
         Mobile mobile = Entity as Mobile;
         if (!mobile.IsAlive || mobile.IsDisposed || mobile.Body == 0)
         {
             return(false);
         }
     }
     m_BaseView.SetAllowDefer();
     return(m_BaseView.Draw(spriteBatch, m_DrawPosition, mouseOverList, map));
 }
Exemplo n.º 27
0
        public void Initialize(UltimaEngine engine)
        {
            Engine = engine;

            m_spriteBatch = new SpriteBatch3D(Engine);

            m_vertexBufferStretched = new VertexPositionNormalTextureHue[] {
                new VertexPositionNormalTextureHue(new Vector3(), new Vector3(), new Vector3(0, 0, 0)),
                new VertexPositionNormalTextureHue(new Vector3(), new Vector3(), new Vector3(1, 0, 0)),
                new VertexPositionNormalTextureHue(new Vector3(), new Vector3(), new Vector3(0, 1, 0)),
                new VertexPositionNormalTextureHue(new Vector3(), new Vector3(), new Vector3(1, 1, 0))
            };
        }
Exemplo n.º 28
0
        public override bool Draw(SpriteBatch3D spriteBatch, Vector3 position, MouseOverList objectList)
        {
            //if (_baseView.GameObject is Mobile mobile)
            //{
            //    if (mobile.IsDead || mobile.IsDisposed || mobile.Graphic == 0)
            //    {
            //        GameObject.Dispose();
            //        return false;
            //    }
            //}

            return(_baseView.DrawInternal(spriteBatch, _position, objectList));
        }
Exemplo n.º 29
0
        public override bool Draw(SpriteBatch3D spriteBatch, Vector3 drawPosition, MouseOverList mouseOverList, Map map)
        {
            int facing     = MirrorFacingForDraw(Entity.Facing);
            int frameIndex = (int)(Entity.Frame * BodyConverter.DeathAnimationFrameCount(Entity.Body));

            IAnimationFrame animationFrame = getFrame(Entity.Body, facing, frameIndex, Entity.Hue);

            DrawTexture = animationFrame.Texture;
            DrawArea    = new Rectangle(0, 0, DrawTexture.Width, DrawTexture.Height);
            DrawFlip    = false;

            return(base.Draw(spriteBatch, drawPosition, mouseOverList, map));
        }
Exemplo n.º 30
0
        public override bool Draw(SpriteBatch3D spriteBatch, Vector3 position, MouseOverList objectList)
        {
            if (GameObject.IsDisposed)
                return false;

            Mobile mobile = (Mobile)GameObject;

            bool mirror = false;
            byte dir = (byte)mobile.GetDirectionForAnimation();
            Animations.GetAnimDirection(ref dir, ref mirror);
            IsFlipped = mirror;
            int mountOffset = 0;
            SetupLayers(dir, ref mobile, ref mountOffset);
            ref AnimationFrameTexture bodyFrame = ref _frames[0].Frame;