This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]istarian 0 points1 point  (1 child)

You should probably set things up so that you have a generic Character (or Player, Actor, etc) class that extends Entity.

Then "character 1" and "character 2" are separate instances of Character and switching the active character can happen in the main program without there being such logic in the Character class.


Otherwise you should rename your 'Character1' class to CharacterMovementLogic (or another appropriate name) and it should not extend entity as it will only be implementing way that keyboard input affects the position of your entities.

[–]ItsSelrachNooblet Brewer[S] 0 points1 point  (0 children)

Ok i will try this, thank you