예제 #1
0
        public override void Update()
        {
            Globals.camera.Follow(this);
            updateVelocity(this, Globals.keyboard);
            updatePosition(this);

            if (Globals.mouse.LeftClick())
            {
                GameGlobals.PassProjectile(new Fireball(new Vector2(pos.X, pos.Y), this, new Vector2(Globals.mouse.newMousePos.X, Globals.mouse.newMousePos.Y)));
            }
            if (Globals.mouse.RightClick())
            {
                GameGlobals.PassMonster(new Frog(20, new Vector2(Globals.mouse.newMousePos.X, Globals.mouse.newMousePos.Y), new Vector2(100, 100)));
            }
            base.Update();
        }