push fail.png and catch display logic
This commit is contained in:
@@ -148,6 +148,7 @@ def onAppStart(app):
|
|||||||
#FISHING
|
#FISHING
|
||||||
app.fishingTimer = 0
|
app.fishingTimer = 0
|
||||||
app.hookedFish = None
|
app.hookedFish = None
|
||||||
|
app.timeSinceInit = 0
|
||||||
|
|
||||||
#list of interactables with name and their positions
|
#list of interactables with name and their positions
|
||||||
#(name, sceneFilter, left, right, top, bottom)
|
#(name, sceneFilter, left, right, top, bottom)
|
||||||
@@ -278,6 +279,8 @@ def onStep(app):
|
|||||||
# - skill-check: advance the cursor's angle around the circle each step.
|
# - skill-check: advance the cursor's angle around the circle each step.
|
||||||
# - otherwise (idle, viewing a catch, in shop): do nothing time-based.
|
# - otherwise (idle, viewing a catch, in shop): do nothing time-based.
|
||||||
|
|
||||||
|
app.timeSinceInit += 1
|
||||||
|
|
||||||
#had to look up how to do switch-case statement in python, I know it from JS though
|
#had to look up how to do switch-case statement in python, I know it from JS though
|
||||||
match app.scene:
|
match app.scene:
|
||||||
case "waiting-for-bite":
|
case "waiting-for-bite":
|
||||||
@@ -470,6 +473,8 @@ def redrawAll(app):
|
|||||||
drawShopEntities(app)
|
drawShopEntities(app)
|
||||||
if app.scene == "skill-check":
|
if app.scene == "skill-check":
|
||||||
drawSkillCheck(app)
|
drawSkillCheck(app)
|
||||||
|
if app.scene == "result":
|
||||||
|
drawCatchDisplay(app)
|
||||||
|
|
||||||
|
|
||||||
drawDebug(app)
|
drawDebug(app)
|
||||||
@@ -588,7 +593,31 @@ def drawCatchDisplay(app):
|
|||||||
# Draw the "you caught it!" popup: the creature's sprite coming out of the
|
# Draw the "you caught it!" popup: the creature's sprite coming out of the
|
||||||
# water, plus its name, description, and stats (length, weight, value).
|
# water, plus its name, description, and stats (length, weight, value).
|
||||||
# Stays up until dismissed by a click (handled in onMousePress). Read-only.
|
# Stays up until dismissed by a click (handled in onMousePress). Read-only.
|
||||||
pass
|
|
||||||
|
#dimming
|
||||||
|
drawRect(0,0,app.width,app.height,opacity=70)
|
||||||
|
|
||||||
|
#draw creature/error
|
||||||
|
imgWidth = 200
|
||||||
|
imgHeight = 150
|
||||||
|
if app.hookedFish != None:
|
||||||
|
drawImage(BASE_IMAGE_URL + f"fish/{creature["sprite-file"]}",
|
||||||
|
app.width // 2,
|
||||||
|
app.height // 2,
|
||||||
|
align = "center",
|
||||||
|
width=imgWidth,
|
||||||
|
height=imgHeight,
|
||||||
|
rotateAngle = math.sin(app.timeSinceInit) * 10)
|
||||||
|
else:
|
||||||
|
#Image Cred: https://freepngimg.com/png/13474-fail-stamp-free-download-png
|
||||||
|
drawImage(BASE_IMAGE_URL + "fail.png",
|
||||||
|
app.width // 2,
|
||||||
|
app.height // 2,
|
||||||
|
align = "center",
|
||||||
|
width=imgWidth,
|
||||||
|
height=imgHeight,
|
||||||
|
)#rotateAngle = math.sin(app.timeSinceInit) * 10)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def drawHud(app):
|
def drawHud(app):
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 78 KiB |
Reference in New Issue
Block a user