namespace Sprint2_actual.StateFiles { public class LinkStateLeftAttack : ILinkState { private Link link; private int counter = 40; public LinkStateLeftAttack(Link link) { this.link = link; link.linkSprite = new LinkSpriteLeftAttack(link); } public void Update() { counter--; if(counter == 0) { this.link.state = new LinkStateLeftIdle(link); } } public void MoveLeft() { //NO-OP //Can't move while attacking } public void TakeDamage() { link.game.Player = new DamagedLink(link); //TO-DO: How does game get in here? Is there any alternative to passing game? } public void MoveRight() { //NO-OP //Can't move while attacking } public void MoveUp() { //NO-OP //Can't move while attacking } public void MoveDown() { //NO-OP //Can't move while attacking } public void Idle() { //NO-OP //Can't move while attacking } public void Attack() { //NO-OP //Already attacking } public void UseItem() { //NO-OP //Can't use item while moving } } }