SyntaxBomb - Indie Coders

Languages & Coding => Monkey => Topic started by: bsisko on October 09, 2019, 03:26:08 AM

Title: What am I doing wrong
Post by: bsisko on October 09, 2019, 03:26:08 AM
This code executes fine, but it displays a blank screen.  My target is a Windows desktop machine

Code: [Select]
'*******************************************************************************************************************************
'*
'*
'*
'*
'*
'*******************************************************************************************************************************

'******************************************************************* imports  **************************************************

Import mojo
Import mojo2
' Import vortex

'******************************************************************  classes  **************************************************
Class Game Extends App
Method OnCreate()
End Method
Method OnUpdate()
End Method
Method OnRender()
End Method
End


Class Title

Field Kanvas : Canvas '   this is the drawing surface
Field Plaque : Image '   png image the holds the title of the game
Field x, y    : Int '   used to hold the x, y coordinates of the title
Field Width, Height      : Int '   used to set the width, height of the title
Field DevlopmentDir        : String '   while working on the game, sets the directroy path of assets
Field ReleaseDir        : String '   once the game is ready to sell, this is the path to look for assets most likely C:\Program Files

Method OnCreate()
DevelopmentDir = "C:\Users\Gary\Documents\temp\Active Projects\Blitz3d CerberusX\lined up\media\images\"
ReleaseDir = "C:\Program Files\Crazy Scorpion\"
Self.Width = 800
Self.Height = 600
Kanvas = New Canvas
Plaque = New Image(Self.Width, Self.Height)
Plaque = LoadImage(DevelopmentDir + "title.png")
Self.x = 1920 / 2
Self.y = 1080 / 2
End Method

Method OnUpdate()
End Method

Method OnRender()
Kanvas.DrawImage Plaque, Title.x, Title.y
End Method
End

'******************************************************************  globals  **************************************************
'******************************************************************  functions  ************************************************

Function Main()
New Game
End Function

Title: Re: What am I doing wrong
Post by: MikeHart on October 09, 2019, 06:14:59 AM
I am not surprised. Nothing of your title class is ever being called.
SimplePortal 2.3.6 © 2008-2014, SimplePortal