コード例 #1
0
        private void AddLayer(int bodyID, int hue, bool asMount = false)
        {
            int   facing    = MirrorFacingForDraw(Facing);
            int   animation = 0;
            float frame     = 0;

            if (Entity is Mobile)
            {
                animation = (Entity as Mobile).Animation.ActionIndex;
                if (asMount)
                {
                    animation = patchMountAction(animation);
                }
                frame = (Entity as Mobile).Animation.AnimationFrame;
            }
            else if (Entity is Corpse)
            {
                animation = ActionTranslator.GetActionIndex(Entity, MobileAction.Death);
                frame     = (Entity as Corpse).Frame * BodyConverter.DeathAnimationFrameCount(Body);
            }

            int             frameCount;
            IAnimationFrame animframe = getFrame(bodyID, ref hue, facing, animation, frame, out frameCount);

            m_MobileLayers[m_LayerCount++] = new MobileViewLayer(bodyID, hue, animframe);
            m_FrameCount = frameCount;
        }
コード例 #2
0
        // ============================================================================================================
        // ctor, pick
        // ============================================================================================================

        public MobileView(AEntity entity)
            : base(entity)
        {
            _mobileLayers       = new MobileViewLayer[(int)EquipLayer.LastUserValid];
            PickType            = PickType.PickObjects;
            IsShadowCastingView = true;
        }
コード例 #3
0
        public MobileView(Mobile mobile)
            : base(mobile)
        {
            m_Animation = new MobileAnimation(mobile);

            m_MobileLayers = new MobileViewLayer[(int)EquipLayer.LastUserValid];
            PickType       = PickType.PickObjects;
        }
コード例 #4
0
ファイル: MobileView.cs プロジェクト: msx752/UltimaXNA
        // ======================================================================
        // Public methods and properties: ctr, update, draw
        // ======================================================================

        public MobileView(AEntity entity)
            : base(entity)
        {
            m_MobileLayers = new MobileViewLayer[(int)EquipLayer.LastUserValid];
            PickType = PickType.PickObjects;

            IsShadowCastingView = true;
        }
コード例 #5
0
        public void AddLayer(int bodyID, int hue)
        {
            int   facing    = MirrorFacingForDraw(Entity.Facing);
            int   animation = m_Animation.ActionIndex;
            float frame     = m_Animation.AnimationFrame;

            m_MobileLayers[m_LayerCount++] = new MobileViewLayer(bodyID, hue, getFrame(bodyID, hue, facing, animation, frame));
            m_FrameCount = IO.Animations.GetAnimationFrameCount(bodyID, animation, facing, hue);
        }
コード例 #6
0
ファイル: MobileView.cs プロジェクト: HankTheDrunk/UltimaXNA
        public void AddLayer(int bodyID, int hue)
        {
            int facing = MirrorFacingForDraw(Entity.Facing);
            int animation = m_Animation.ActionIndex;
            float frame = m_Animation.AnimationFrame;

            int frameCount;
            m_MobileLayers[m_LayerCount++] = new MobileViewLayer(bodyID, hue, getFrame(bodyID, hue, facing, animation, frame, out frameCount));
            m_FrameCount = frameCount;
        }
コード例 #7
0
ファイル: MobileView.cs プロジェクト: denizsokmen/UltimaXNA
        private void AddLayer(int bodyID, int hue, bool asMount = false)
        {
            int facing = MirrorFacingForDraw(Facing);
            int animation = 0;
            float frame = 0;
            if (Entity is Mobile)
            {
                animation = (Entity as Mobile).Animation.ActionIndex;
                if (asMount)
                    animation = patchMountAction(animation);
                frame = (Entity as Mobile).Animation.AnimationFrame;
            }
            else if (Entity is Corpse)
            {
                animation = ActionTranslator.GetActionIndex(Entity, MobileAction.Death);
                frame = (Entity as Corpse).Frame * BodyConverter.DeathAnimationFrameCount(Body);
            }

            int frameCount;
            IAnimationFrame animframe = getFrame(bodyID, ref hue, facing, animation, frame, out frameCount);
            m_MobileLayers[m_LayerCount++] = new MobileViewLayer(bodyID, hue, animframe);
            m_FrameCount = frameCount;
        }