Пример #1
0
 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);
 }
Пример #2
0
        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();
        }