-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathcritter_frames.py
More file actions
25 lines (20 loc) · 841 Bytes
/
Copy pathcritter_frames.py
File metadata and controls
25 lines (20 loc) · 841 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright (C) 2026 lollapalooza <https://github.com/aqua5230>
#
# Part of "usage". Free software licensed under the GNU Affero General Public
# License v3.0 only; see the LICENSE file for full terms and the warranty disclaimer.
from __future__ import annotations
PHOENIX_FRAMES = tuple(f"critters/phoenix/{index}.png" for index in range(1, 6))
DRAGON_FRAMES = tuple(f"critters/dragon/{index}.png" for index in range(1, 6))
IDLE_INTERVAL_SECONDS = 0.0
NORMAL_INTERVAL_SECONDS = 0.18
ACTIVE_INTERVAL_SECONDS = 0.10
HEAVY_INTERVAL_SECONDS = 0.05
def group_to_interval(group: int) -> float:
if group <= 0:
return IDLE_INTERVAL_SECONDS
if group == 1:
return NORMAL_INTERVAL_SECONDS
if group == 2:
return ACTIVE_INTERVAL_SECONDS
return HEAVY_INTERVAL_SECONDS