playground:musicspacial
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| playground:musicspacial [2017/05/12 15:50] – créée falsam | playground:musicspacial [2023/03/15 15:49] (Version actuelle) – modification externe 127.0.0.1 | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| + | **14-MusicSpacial.sb** | ||
| + | |||
| + | [[http:// | ||
| + | |||
| + | <file purebasic | ||
| + | ; | ||
| + | |||
| + | EnableExplicit | ||
| + | |||
| + | IncludeFile " | ||
| + | UseModule BJS | ||
| + | |||
| + | Global Scene, Camera, Light, Sound1, Sound2, Ground, GroundTex, GroundMat, Pole1, Pole2 | ||
| + | |||
| + | Declare LoadGame() | ||
| + | Declare RenderGame() | ||
| + | |||
| + | InitEngine(@LoadGame()) | ||
| + | |||
| + | Procedure LoadGame() | ||
| + | Scene = CreateScene() | ||
| + | If Scene | ||
| + | | ||
| + | ;Load Music | ||
| + | MusicLoad(" | ||
| + | Sound1 = MusicLoad(" | ||
| + | Sound2 = MusicLoad(" | ||
| + | | ||
| + | ;Camera | ||
| + | Camera = CreateCamera(" | ||
| + | CameraBodySize(Camera, | ||
| + | CameraLookAt(Camera, | ||
| + | ClearScene(RGB(0, | ||
| + | Light = CreateLight(" | ||
| + | | ||
| + | ;Ground | ||
| + | Ground = CreateGround(" | ||
| + | GroundTex = LoadTexture(" | ||
| + | GroundMat = CreateMaterial(" | ||
| + | SetMaterialTexture(GroundMat, | ||
| + | ScaleMaterial(GroundMat, | ||
| + | SetMeshMaterial(Ground, | ||
| + | | ||
| + | ;Music Pole | ||
| + | Pole1 = CreateSphere(" | ||
| + | MoveMesh(Pole1, | ||
| + | MusicAttachToMesh(Pole1, | ||
| + | |||
| + | Pole2 = CreateSphere(" | ||
| + | MoveMesh(Pole2, | ||
| + | MusicAttachToMesh(Pole2, | ||
| + | |||
| + | RenderLoop(@RenderGame()) | ||
| + | EndIf | ||
| + | EndProcedure | ||
| + | |||
| + | Procedure RenderGame() | ||
| + | RenderWorld() | ||
| + | EndProcedure | ||
| + | </ | ||
