Skip to content

Commit c3eecee

Browse files
committed
Update
1 parent 54e060d commit c3eecee

3 files changed

Lines changed: 3 additions & 0 deletions

File tree

costume.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ def __init__(self):
1313
self.dataFormat = "svg"
1414
self.rotationCenterX = 0
1515
self.rotationCenterY = 0
16+
self.currentRotationCenter = (0, 0)
1617
self.bitmapResolution = 1
1718
self.file = None
1819
self.name = "" # display name

sb3Unpacker.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ def sb3Unpack(sb3):
6161
if "md5ext" in costumeObj:
6262
c.md5ext = costumeObj["md5ext"]
6363
c.rotationCenterX, c.rotationCenterY = costumeObj["rotationCenterX"], costumeObj["rotationCenterY"]
64+
c.currentRotationCenter = (c.rotationCenterX, c.rotationCenterY)
6465
c.dataFormat = costumeObj["dataFormat"]
6566
c.file = project.read(costumeObj["assetId"] + "." + costumeObj["dataFormat"])
6667
c.name = costumeObj["name"]

targetSprite.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ def setXy(self, x, y):
9494
self.rect.x = scratch.WIDTH // 2 + self.x + offset.x
9595
self.rect.y = scratch.HEIGHT // 2 - self.y + offset.y
9696
print(self.rect.x, self.rect.y, "/", self.x, self.y, "/", offset.x, offset.y)
97+
# TODO update current rotation centre to correct sprite position
9798

9899
# Relatively set self position
99100
def setXyDelta(self, dx, dy):

0 commit comments

Comments
 (0)