public void Update(float elapsedTime, string passedState) { state = passedState; if (state == "Stand") { fighterTexture = stand; loopType = "RevLoop"; } else if (state == "Foreward") { fighterTexture = foreward; loopType = "Loop"; } else if (state == "Backward") { fighterTexture = backward; loopType = "Loop"; } /*else if (state == "Crouch") fighterTexture = crouch;*/ fighterTexture.UpdateFrame(elapsedTime, loopType); Width = fighterTexture.Width; Height = fighterTexture.Height; }
public TextureHandler(string passedName) { stand = new AnimatedTexture(); crouch = new AnimatedTexture(); foreward = new AnimatedTexture(); backward = new AnimatedTexture(); fighterTexture = new AnimatedTexture(); charName = passedName; }