예제 #1
0
        public override void Draw()
        {
            if (FrameIndex >= FrameCount && !Repeat)
            {
                return;
            }
            if (BodyLibrary == null)
            {
                return;
            }

            if (Blend)
            {
                BodyLibrary.DrawBlend(DrawFrame + FrameIndex, DrawLocation, DrawColour, true, 0.8F);
            }
            else
            {
                BodyLibrary.Draw(DrawFrame + FrameIndex, DrawLocation, DrawColour, true);
            }
            //画特效
            if (EffectCount <= 0)
            {
                return;
            }
            if (EffectIndex >= EffectCount && !Repeat)
            {
                return;
            }
            BodyLibrary.DrawBlend(EffectStart + EffectIndex, DrawLocation, Color.White, true, 0.8F);
        }
예제 #2
0
 public override void Draw()
 {
     if (BodyLibrary != null)
     {
         BodyLibrary.Draw(DrawFrame, DrawLocation, DrawColour);
     }
 }
예제 #3
0
        public override void DrawEffects()
        {
            if (BodyLibrary == null)
            {
                return;
            }

            if (DrawWingFrame > 0)
            {
                BodyLibrary.DrawBlend(DrawWingFrame, DrawLocation, Color.White, true);
            }
        }
예제 #4
0
        public override void Draw()
        {
            //  Draw in front
            if (BodyLibrary != null)
            {
                BodyLibrary.Draw(DrawFrame, DrawLocation, DrawColour);
            }
            //  Draw behind

            if (Libraries.FloorItemEffect != null && Settings.DropEffect)//give them option :P
            {
                Draw_EE_Effect(DrawLocation);
            }
        }
예제 #5
0
        public void Load(S.ObjectItem info)
        {
            Name       = info.Name;
            NameColour = info.NameColour;

            BodyLibrary = Libraries.FloorItems;

            CurrentLocation = info.Location;
            MapLocation     = info.Location;
            GameScene.Scene.MapControl.AddObject(this);
            DrawFrame = info.Image;

            Size = BodyLibrary.GetTrueSize(DrawFrame);

            DrawY = CurrentLocation.Y;
        }
예제 #6
0
        public override void Draw()
        {
            if (FrameIndex >= FrameCount && !Repeat)
            {
                return;
            }
            if (BodyLibrary == null)
            {
                return;
            }

            if (Blend)
            {
                BodyLibrary.DrawBlend(DrawFrame + FrameIndex, DrawLocation, DrawColour, true, 0.8F);
            }
            else
            {
                BodyLibrary.Draw(DrawFrame + FrameIndex, DrawLocation, DrawColour, true);
            }
        }
예제 #7
0
        public override void Draw()
        {
            if (BodyLibrary == null)
            {
                return;
            }

            BodyLibrary.Draw(DrawFrame, DrawLocation, DrawColour, true);

            if (QuestIcon == QuestIcon.None)
            {
                return;
            }

            var offSet = BodyLibrary.GetOffSet(BaseIndex);
            var size   = BodyLibrary.GetSize(BaseIndex);

            int imageIndex = 981 + ((int)QuestIcon * 2) + QuestIndex;

            //Libraries.Prguse.Draw(981 + ((int)QuestIcon * 2) + QuestIndex, DrawLocation.Add(offSet).Add(0, -40), Color.White, false);
            Libraries.Prguse.Draw(imageIndex, DrawLocation.Add(offSet).Add(size.Width / 2 - 28, -40), Color.White, false);
        }
예제 #8
0
        public void Load(S.ObjectGold info)
        {
            // Name = string.Format("Gold ({0:###,###,###})", info.Gold);
            Name = "金币";

            BodyLibrary = Libraries.FloorItems;

            CurrentLocation = info.Location;
            MapLocation     = info.Location;
            GameScene.Scene.MapControl.AddObject(this);

            if (info.Gold < 100)
            {
                DrawFrame = 112;
            }
            else if (info.Gold < 200)
            {
                DrawFrame = 113;
            }
            else if (info.Gold < 500)
            {
                DrawFrame = 114;
            }
            else if (info.Gold < 1000)
            {
                DrawFrame = 115;
            }
            else
            {
                DrawFrame = 116;
            }

            Size = BodyLibrary.GetTrueSize(DrawFrame);

            DrawY = CurrentLocation.Y;
        }
예제 #9
0
 public override bool MouseOver(Point p)
 {
     return(MapControl.MapLocation == CurrentLocation || BodyLibrary != null && BodyLibrary.VisiblePixel(DrawFrame, p.Subtract(FinalDrawLocation), false));
 }
예제 #10
0
        public override void Process()
        {
            bool update = CMain.Time >= NextMotion || GameScene.CanMove;

            ProcessFrames();

            if (update)
            {
                UpdateBestQuestIcon();
            }

            if (Frame == null)
            {
                DrawFrame     = 0;
                DrawWingFrame = 0;
            }
            else
            {
                DrawFrame     = Frame.Start + (Frame.OffSet * (byte)Direction) + FrameIndex;
                DrawWingFrame = Frame.EffectStart + (Frame.EffectOffSet * (byte)Direction) + EffectFrameIndex;
            }

            DrawY = CurrentLocation.Y;

            DrawLocation = new Point((Movement.X - User.Movement.X + MapControl.OffSetX) * MapControl.CellWidth, (Movement.Y - User.Movement.Y + MapControl.OffSetY) * MapControl.CellHeight);
            DrawLocation.Offset(User.OffSetMove);
            if (BodyLibrary != null)
            {
                FinalDrawLocation = DrawLocation.Add(BodyLibrary.GetOffSet(DrawFrame));
            }

            if (BodyLibrary != null && update)
            {
                FinalDrawLocation = DrawLocation.Add(BodyLibrary.GetOffSet(DrawFrame));
                DisplayRectangle  = new Rectangle(DrawLocation, BodyLibrary.GetTrueSize(DrawFrame));
            }

            for (int i = 0; i < Effects.Count; i++)
            {
                Effects[i].Process();
            }

            Color colour = DrawColour;

            switch (Poison)
            {
            case PoisonType.None:
                DrawColour = Color.White;
                break;

            case PoisonType.Green:
                DrawColour = Color.Green;
                break;

            case PoisonType.Red:
                DrawColour = Color.Red;
                break;

            case PoisonType.Bleeding:
                DrawColour = Color.DarkRed;
                break;

            case PoisonType.Slow:
                DrawColour = Color.Purple;
                break;

            case PoisonType.Stun:
                DrawColour = Color.Yellow;
                break;

            case PoisonType.Frozen:
                DrawColour = Color.Blue;
                break;

            case PoisonType.Paralysis:
                DrawColour = Color.Gray;
                break;
            }


            if (colour != DrawColour)
            {
                GameScene.Scene.MapControl.TextureValid = false;
            }


            if (CMain.Time > QuestTime)
            {
                QuestTime = CMain.Time + 500;
                if (++QuestIndex > 1)
                {
                    QuestIndex = 0;
                }
            }
        }
예제 #11
0
 public override void Draw()
 {
     BodyLibrary.Draw(Image, DrawLocation, DrawColour, true);
 }