Пример #1
0
        public override void DrawActor(KthuraActor obj, int ix = 0, int iy = 0, int scrollx = 0, int scrolly = 0)
        {
            var tx = GetTex(obj);

            if (tx != null)
            {
                obj.UpdateMoves();
                TQMG.Color((byte)obj.R, (byte)obj.G, (byte)obj.B);
                //TQMG.SetAlphaFloat((float)obj.Alpha1000 / 1000);
                TQMG.SetAlpha((byte)obj.Alpha255);
                //TQMG.RotateRAD((float)obj.RotationRadians);
                TQMG.RotateDEG(obj.RotationDegrees);
                TQMG.Scale(obj.ScaleX, obj.ScaleY);
                if (obj.AnimFrame >= tx.Frames)
                {
                    obj.AnimFrame = 0;
                }
                tx.XDraw(obj.x + ix - scrollx, obj.y + iy - scrolly, obj.AnimFrame);
                TQMG.Scale(1000, 1000);
                TQMG.RotateRAD(0);
                TQMG.SetAlpha(255);
            }
            else
            {
                CrashOnNoTex?.Invoke($"Actor-texture '{obj.Texture}' did somehow not load?");
            }
        }