codetower/ct_comp.py

62 lines
1.5 KiB
Python

import bge
from collections import OrderedDict
###############################################################################
# ct_comp.py
# @title: Composants python
# @project: CodeTower
# @lang: fr,en
# @authors: Philippe Roy <phroy@phroy.org>
# @copyright: Copyright (C) 2022 Philippe Roy
# @license: GNU GPL
#
# This game is a tower defense coding game. The towers are driven by Python code.
# Ce simulateur est un jeu du type tower defense où les tours sont à piloter par la programmation Python.
#
###############################################################################
# Récupérer les objets 3D
# scene = bge.logic.getCurrentScene()
###############################################################################
# Minion
###############################################################################
class Minion(bge.types.KX_PythonComponent):
args = OrderedDict([
("cat", ""),
("level", 0),
("hp", 0.0),
("speed", 0.0),
("armor", 0.0),
("bounty", 0),
("lifes_damage", 0)
])
def start(self, args):
pass
def update(self):
pass
###############################################################################
# Tower
###############################################################################
class Tower(bge.types.KX_PythonComponent):
args = OrderedDict([
("cat", ""),
("level", 0),
("tower_name", ""),
("damage", 0.0),
("speed", 0.0),
("range", 0.0)
])
def start(self, args):
pass
def update(self):
pass