diff options
author | Niclas Dobbertin <niclas.dobbertin@mailbox.org> | 2024-01-09 08:29:40 +0100 |
---|---|---|
committer | Niclas Dobbertin <niclas.dobbertin@mailbox.org> | 2024-01-09 08:29:40 +0100 |
commit | 1a988e6a6769d7a9bbc9956da80ee2dfc2200d64 (patch) | |
tree | 3e118364a6d8b56f62a59169878f76c6984769f3 /characters.py | |
parent | 52fd3556d4ef89dec4d138567f7fa90722a74dd9 (diff) |
character-action-button structure start
Diffstat (limited to 'characters.py')
-rw-r--r-- | characters.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/characters.py b/characters.py new file mode 100644 index 0000000..6166323 --- /dev/null +++ b/characters.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python3 + +import ui +from enum import Enum + +Status = Enum("Status", ["NEUTRAL", "DOWN", "ATTACKING", "HIT"]) + + +class Action: + def __init__(self, name, button): + self.name = name + self.button = button + + +class Cowboy: + hp = 1000 + frame_advantage = 0 + status = Status.NEUTRAL + position = (0,0) + + all_actions = ( + Action("slash", ui.Button("attack1")), + Action("jump", ui.Button("move1")), + Action("block", ui.Button("move2")), + Action("hold", ui.Button("hold")), + ) |