예제 #1
0
		void FixScreenRect() {
			if ( isoWorld ) {
				var l = isoWorld.IsoToScreen(position + IsoUtils.Vec3FromY(size.y)).x;
				var r = isoWorld.IsoToScreen(position + IsoUtils.Vec3FromX(size.x)).x;
				var b = isoWorld.IsoToScreen(position).y;
				var t = isoWorld.IsoToScreen(position + size).y;
				Internal.ScreenRect = new Rect(l, b, r - l, t - b);
			}
		}
예제 #2
0
        // ---------------------------------------------------------------------
        //
        // Private
        //
        // ---------------------------------------------------------------------

        void FixScreenBounds()
        {
            var iso_world = isoWorld;

            if (iso_world)
            {
                var l = iso_world.IsoToScreen(position + IsoUtils.Vec3FromY(size.y)).x;
                var r = iso_world.IsoToScreen(position + IsoUtils.Vec3FromX(size.x)).x;
                var b = iso_world.IsoToScreen(position).y;
                var t = iso_world.IsoToScreen(position + size).y;
                Internal.QTBounds.Set(l, b, r, t);
            }
            else
            {
                Internal.QTBounds.Set(0.0f, 0.0f, 0.0f, 0.0f);
            }
        }