Hier der code
Code: Alles auswählen
InitEngine3D()
InitSprite()
OpenScreen(1920,1080,32,"RG32bit DX0")
CreateTexture(0,20,20)
StartDrawing(TextureOutput(0))
Box(0,0,20,20,RGB(0,255,0))
StopDrawing()
CreateMaterial(0,TextureID(0))
CreateTexture(1,20,20)
StartDrawing(TextureOutput(1))
Box(0,0,20,20,RGB(0,0,255))
StopDrawing()
CreateMaterial(1,TextureID(1))
Add3DArchive("skybox.zip",#PB_3DArchive_Zip)
InitKeyboard()
SkyBox("stevecube.jpg")
CreateCamera(0,0,0,100,100)
CreateCube(0,5)
Y=0
X=40
;MaterialBlendingMode(0,#PB_Material_AlphaBlend)
CreateEntity(1,MeshID(0),MaterialID(1),0,10,10)
MoveCamera(0,EntityX(1),EntityY(1),EntityZ(1),#PB_Absolute)
ENTITYID = 10
Repeat
CreateEntity(ENTITYID,MeshID(0),MaterialID(0),X,0,Y)
EntityPhysicBody(ENTITYID,#PB_Entity_StaticBody)
;SetEntityAttribute(ENTITYID,#PB_Entity_Friction,0)
X + 5
If X = 100
Y + 5
X = 0
EndIf
ENTITYID + 1
Until Y = 20
EnableWorldCollisions(1)
EnableWorldPhysics(1)
EntityPhysicBody(1,#PB_Entity_BoxBody)
SetEntityAttribute(1,#PB_Entity_Friction,0)
SetEntityAttribute(1,#PB_Entity_Restitution,0)
MoveEntity(1,10,0,0)
Repeat
ExamineKeyboard()
CameraLookAt(0,EntityX(1),EntityY(1),EntityZ(1))
;MoveCamera(0,EntityX(1),EntityY(1),EntityZ(1),#PB_Absolute)
;RotateCamera(0,0,EntityYaw(1),0,#PB_Absolute)
If KeyboardPushed(#PB_Key_W)
EndIf
>>MoveEntity(1,1,0,0,#PB_Relative|#PB_Local)
RenderWorld()
FlipBuffers()
If KeyboardPushed(#PB_Key_Escape)
End
EndIf
ForEver