Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions GTA karachi
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good

Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
from kivy.app import App
from kivy.uix.widget import Widget
from kivy.uix.image import Image
from kivy.core.window import Window
from kivy.clock import Clock
from kivy.uix.relativelayout import RelativeLayout

# گیم کا مرکزی کلاس
class HeroGame(RelativeLayout):
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.hero = Image(source="hero.png", size_hint=(None, None), size=(100, 100), pos=(200, 200))
self.add_widget(self.hero)
Clock.schedule_interval(self.update, 1/60)

def on_touch_move(self, touch):
self.hero.pos = (touch.x - self.hero.width / 2, touch.y - self.hero.height / 2)

def update(self, dt):
pass # یہاں مزید فیچرز ایڈ کیے جا سکتے ہیں

class GTAKarachiApp(App):
def build(self):
return HeroGame()

# ایپلیکیشن چلائیں
if __name__ == '__main__':
GTAKarachiApp().run()