public Player(Vector2 position) : base(position) { AddComponent(new PawnGraphics()); body = AddComponent <PawnBody>(new PawnBody()); input = AddComponent <PlayerInput>(new PlayerInput()); //must go after body health = AddComponent <Health>(new Health(100f)); Inventory = AddComponent <Inventory>(new Inventory()); }
public Enemy(Vector2 position) : base(position) { body = AddComponent <PawnBody>(new PawnBody()); input = AddComponent <EnemyInput>(new EnemyInput()); AddComponent(new PawnGraphics()); Health = AddComponent <Health>(new Health(100)); Vision = AddComponent <EnemyVision>(new EnemyVision()); //AddComponent(new EnemyAI()); ChangeMotionState(new MotionIdleState(this)); }