From cf2c9dfb3033b243be4a9c1112d9cd157786040e Mon Sep 17 00:00:00 2001 From: Silas Gyger Date: Fri, 17 Jul 2015 12:21:05 +0200 Subject: [PATCH] Issue #21: Renamed Warios components --- Actors.py | 10 +++++----- Components/WarioComponents.py | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Actors.py b/Actors.py index e0c7c28..e00cd2a 100644 --- a/Actors.py +++ b/Actors.py @@ -1,5 +1,5 @@ from GameActor import * -from Components.WarioComponents import * +import Components.WarioComponents as wc from Components.GeneralComponents import * @@ -8,8 +8,8 @@ def __init__(self, position, engine_wrapper): GameActor.__init__(self, position, engine_wrapper) self.rect.size = (20, 30) self.components = [GravityComponent(), - WarioStatesComponent(), - LookComponent(), - WarioMoveComponent(), + wc.StatesComponent(), + wc.LookComponent(), + wc.MoveComponent(), GeneralCollisionComponent(), - ApplyVelocityComponent()] + ApplyVelocityComponent()] \ No newline at end of file diff --git a/Components/WarioComponents.py b/Components/WarioComponents.py index 963b5b1..13c567f 100644 --- a/Components/WarioComponents.py +++ b/Components/WarioComponents.py @@ -10,9 +10,9 @@ import logging -class WarioMoveComponent(StatesComponent, VelocityComponent): +class MoveComponent(StatesComponent, VelocityComponent): def __init__(self): - super(WarioMoveComponent, self).__init__() + super(MoveComponent, self).__init__() self.velocity = [0, 0] self.walk_speed = 1 @@ -21,7 +21,7 @@ def __init__(self): self.jumped_before = 0 def receive_message(self, name, value): - super(WarioMoveComponent, self).receive_message(name, value) + super(MoveComponent, self).receive_message(name, value) if name == MSGN.VELOCITY: self.velocity = value @@ -57,7 +57,7 @@ def update(self, game_actor, engine): game_actor.send_message(MSGN.VELOCITY, self.velocity) -class WarioStatesComponent(StatesComponent): +class StatesComponent(StatesComponent): def __init__(self): self.draw_state = True