Skip to content

Commit

Permalink
Issue #21: Renamed Warios components
Browse files Browse the repository at this point in the history
  • Loading branch information
Nearoo committed Jul 17, 2015
1 parent 4ec4110 commit cf2c9df
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions Actors.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from GameActor import *
from Components.WarioComponents import *
import Components.WarioComponents as wc
from Components.GeneralComponents import *


Expand All @@ -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()]
8 changes: 4 additions & 4 deletions Components/WarioComponents.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit cf2c9df

Please sign in to comment.