From 1a988e6a6769d7a9bbc9956da80ee2dfc2200d64 Mon Sep 17 00:00:00 2001 From: Niclas Dobbertin Date: Tue, 9 Jan 2024 08:29:40 +0100 Subject: character-action-button structure start --- characters.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 characters.py (limited to 'characters.py') 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")), + ) -- cgit v1.2.3