Пример #1
0
        override public void update()
        {
            if (FlxG.mouse.justPressed())
            {
                robot.hurt(2);

                bar2.setValue(robot.health);
            }


            //if (FlxG.keys.justPressed(Keys.W))
            //{
            //    bar2.emptyBar.offset.Y -= 1;
            //}
            //if (FlxG.keys.justPressed(Keys.S))
            //{
            //    bar2.emptyBar.offset.Y += 1;
            //}
            //if (FlxG.keys.justPressed(Keys.A))
            //{
            //    bar2.emptyBar.offset.X -= 1;
            //}
            //if (FlxG.keys.justPressed(Keys.D))
            //{
            //    bar2.emptyBar.offset.X += 1;
            //}
            //Console.WriteLine("Offset {0} {1}", bar2.emptyBar.offset.X, bar2.emptyBar.offset.Y);

            base.update();
        }