- Katılım
- 22 May 2021
- Mesajlar
- 1,486
- Beğeniler
- 341
Bu Gün sizler ile birlikte python kullanarak oyun yapıcaz 
Yapıcağımız Oyun: Minecraft
Dil: Python
Program: PyCharm Community Edition
(istediğiniz programı kullanın)
öncelikle bu kodlar bana ait değildir !
Nasıl Kullanılır:
öncelikle boş bir proje açın ondan sonra projenin teminal kısmına gelin ve "pip install ursina" yazıp entere basın ve size verdiğim kodu yapıştırın Shift+F10 a basın
(@Dreamfancy Lütfen artık konular kısmına python ekleyin)
Kodlar:
from ursina import *
from ursina.prefabs.first_person_controller import FirstPersonController
app = Ursina()
# cheatglobal.com
# HTS
class Voxel(Button):
def __init__(self, position=(0,0,0)):
super().__init__(
parent = scene,
position = position,
model = 'cube',
origin_y = .5,
texture = 'white_cube',
color = color.color(0, 0, random.uniform(.9, 1.0)),
highlight_color = color.lime,
)
def input(self, key):
if self.hovered:
if key == 'right mouse down':
voxel = Voxel(position=self.position + mouse.normal)
if key == 'left mouse down':
destroy(self)
for z in range(8):
for x in range(8):
voxel = Voxel(position=(x,0,z))
player = FirstPersonController()
app.run()
Yapıcağımız Oyun: Minecraft
Dil: Python
Program: PyCharm Community Edition
(istediğiniz programı kullanın)
öncelikle bu kodlar bana ait değildir !
Nasıl Kullanılır:
öncelikle boş bir proje açın ondan sonra projenin teminal kısmına gelin ve "pip install ursina" yazıp entere basın ve size verdiğim kodu yapıştırın Shift+F10 a basın
(@Dreamfancy Lütfen artık konular kısmına python ekleyin)
Kodlar:
from ursina import *
from ursina.prefabs.first_person_controller import FirstPersonController
app = Ursina()
# cheatglobal.com
# HTS
class Voxel(Button):
def __init__(self, position=(0,0,0)):
super().__init__(
parent = scene,
position = position,
model = 'cube',
origin_y = .5,
texture = 'white_cube',
color = color.color(0, 0, random.uniform(.9, 1.0)),
highlight_color = color.lime,
)
def input(self, key):
if self.hovered:
if key == 'right mouse down':
voxel = Voxel(position=self.position + mouse.normal)
if key == 'left mouse down':
destroy(self)
for z in range(8):
for x in range(8):
voxel = Voxel(position=(x,0,z))
player = FirstPersonController()
app.run()
Son düzenleme: