Blitz3D Tutorial 10 - Functions (Old)

21.03.2010
Hi! Thanks for watching! This is where I teach you all about functions and how to use them effectively. How to make more basic functions will be covered in later tutorials when I show you how to make a simple 3D game. The code is: welcome() Graphics3D 1040,900 SetBuffer BackBuffer() camera = CreateCamera() PositionEntity camera,0,0,-10 light = CreateLight() For x = -3 To 3 cube = CreateCube() EntityColor cube,Rand(0,255),Rand(0,255),Rand(0,255) PositionEntity cube,x,x,0 ScaleEntity cube,0.5,0.5,0.5 Next While Not KeyDown(1) RenderWorld Flip Wend End Function welcome() Graphics 400,400 Text 10,10, "Welcome!" Text 10,20, "This is a test function." While Not KeyDown(1) If KeyDown(2) Then Return EndIf Wend End Function

Похожие видео

Показать еще