public Goriya(int x, int y, int width, int height, GoriyaStateMachine.GoriyaColor c, Texture2D spriteSheet) { stateMachine = new GoriyaStateMachine(x, y, width, height, c); goriyaSpriteSheet = spriteSheet; init = new Tuple <int, int, int, int, GoriyaStateMachine.GoriyaColor>(x, y, width, height, c); boomerang = new GoriyaBoomerang(goriyaSpriteSheet, stateMachine); }
public void Update() { if (!stateMachine.Throwing() && stateMachine.TryToThrow()) { boomerang = new GoriyaBoomerang(goriyaSpriteSheet, stateMachine); } if (stateMachine.Throwing()) { boomerang.Update(); } stateMachine.Move(); destination = stateMachine.GetDestination(); source = stateMachine.GetSource(); }