mirror of
https://github.com/OMGeeky/pytiled_parser.git
synced 2025-12-26 17:02:28 +01:00
Merge branch 'rf/caster' of https://github.com/Beefy-Swain/pytiled_parser into rf/caster
This commit is contained in:
@@ -4,9 +4,9 @@ from typing import Callable, Dict, List, Optional, Union
|
||||
|
||||
import attr
|
||||
|
||||
from pytiled_parser import OrderedPair, Size
|
||||
from pytiled_parser.properties import Properties
|
||||
from pytiled_parser.template import Template
|
||||
from .common_types import OrderedPair, Size
|
||||
from .properties import Properties
|
||||
from .template import Template
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True, kw_only=True)
|
||||
@@ -38,6 +38,7 @@ class TiledObject:
|
||||
size: Size = Size(0, 0)
|
||||
rotation: float = 0
|
||||
opacity: float = 1
|
||||
visible: bool
|
||||
|
||||
name: Optional[str] = None
|
||||
type: Optional[str] = None
|
||||
|
||||
@@ -4,7 +4,7 @@ from contextlib import ExitStack as does_not_raise
|
||||
|
||||
import pytest
|
||||
|
||||
from pytiled_parser import tiled_object
|
||||
from pytiled_parser import common_types, tiled_object
|
||||
|
||||
ELLIPSES = []
|
||||
|
||||
@@ -21,17 +21,15 @@ RECTANGLES = [
|
||||
"x":27.7185404115039,
|
||||
"y":23.571672160964}
|
||||
""",
|
||||
{
|
||||
"height": 41.4686825053996,
|
||||
"id": 1,
|
||||
"name": "name: rectangle",
|
||||
"rotation": 0,
|
||||
"type": "rectangle",
|
||||
"visible": True,
|
||||
"width": 45.3972945322269,
|
||||
"x": 27.7185404115039,
|
||||
"y": 23.571672160964,
|
||||
},
|
||||
tiled_object.Rectangle(
|
||||
id_=1,
|
||||
size=common_types.Size(41.4686825053996, 45.3972945322269),
|
||||
name="name: rectangle",
|
||||
rotation=0,
|
||||
type="rectangle",
|
||||
visible=True,
|
||||
coordinates=common_types.OrderedPair(27.7185404115039, 23.571672160964),
|
||||
),
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user