• Dear Cerberus X User!

    As we prepare to transition the forum ownership from Mike to Phil (TripleHead GmbH), we need your explicit consent to transfer your user data in accordance with our amended Terms and Rules in order to be compliant with data protection laws.

    Important: If you accept the amended Terms and Rules, you agree to the transfer of your user data to the future forum owner!

    Please read the new Terms and Rules below, check the box to agree, and click "Accept" to continue enjoying your Cerberus X Forum experience. The deadline for consent is April 5, 2024.

    Do not accept the amended Terms and Rules if you do not wish your personal data to be transferred to the future forum owner!

    Accepting ensures:

    - Continued access to your account with a short break for the actual transfer.

    - Retention of your data under the same terms.

    Without consent:

    - You don't have further access to your forum user account.

    - Your account and personal data will be deleted after April 5, 2024.

    - Public posts remain, but usernames indicating real identity will be anonymized. If you disagree with a fictitious name you have the option to contact us so we can find a name that is acceptable to you.

    We hope to keep you in our community and see you on the forum soon!

    All the best

    Your Cerberus X Team

Sprite following mouse

przemek

New member
Joined
Sep 18, 2017
Messages
62
Hi there,

So, in my previous threat I have asked about sprite following cursor and it works great but now I have another problem. I am planning to have several sprites following the mouse and i will just try and copy and paste the code for the first sprite with few changes (if it doesnt work ill do another threat). However I dont want all 3 or 4 sprites to follow my mouse at the same time so I've decided to try to bind each sprite to different keys and when I press, for example 1, it will make farm sprite appear and when I press B it will disappear.

So my question is how do I make sprites dissapear when the game starts, how do i make them appear and disappear again and where should I put the code for appear and disappear?

Also I nearly forgot how do I make them stay with ,for example left mouse botton, on the coordinates where i pressed it?

If you need the code here it is:

Code:
Strict

Import mojo




Class Game Extends App
      
             
     
     
'timer
    Field lastTick:Int
    Field secs:Int
    Field mins:Int
    Field hrs:Int
    Field dys:Int
 
  'resources
    Field wood:Float
     Field loopedtimeforwood:Int
   
     Field y2:Float
     Field x2:Float
   
   
'character
    Field x:Float = 575
    Field y:Float = 420
    Field size:Float = 10
    Field BorderXMin:Float = 1
    Field BorderXMax:Float = 1270
    Field BorderYMin:Float = 25
    Field BorderYMax:Float = 870
  
     Field character:Image
     Field farm:Image
     Field p1:Game
   

  
  
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   

   
    Method OnCreate:Int()
        SetUpdateRate(60)
        lastTick = Millisecs()
        loopedtimeforwood = 0
        wood = 0
      
        SetDeviceWindow(1280,960,0)
      
  
      
        'character
        farm = LoadImage("ground.png")
        character = LoadImage("character.png")
      
        SetUpdateRate 60
      
      
      
        Return 0
      
    End Method
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
    Method OnUpdate:Int()
        Local tick:Int = Millisecs()
        If tick>=(lastTick+1000)
            lastTick = tick
            secs += 1
            loopedtimeforwood+=1
        Endif
        If secs > 59 Then
            secs = 0
            mins +=1
            If mins > 59 Then
                mins = 0
                hrs +=1
                If hrs > 23 Then
                    hrs = 0
                    dys += 1
                Endif
            Endif
        Endif
      
       If loopedtimeforwood >= 20
               wood+=1
               If KeyDown (KEY_A) Then wood+=1
           loopedtimeforwood =0
        End
      
       x = Clamp(x, BorderXMin, BorderXMax - size)
       y = Clamp(y, BorderYMin, BorderYMax - size)
            
       If x2 < MouseX() Then x2+=40
       If x2 > MouseX() Then x2-=40
       If y2 < MouseY() Then y2+=40
       If y2 > MouseY() Then y2-=40
                 
       If KeyDown (KEY_LEFT) Then x = x - 4
       If KeyDown (KEY_RIGHT) Then x = x + 4
       If KeyDown (KEY_UP) Then y = y-4
       If KeyDown (KEY_DOWN) Then y = y +4
       'keydown means keep moving until key is down where keyhit is do a thing until
     
    
     
        Return 0
    End Method
    Method OnRender:Int()
      
        Cls 124, 256, 0
        DrawText("Mins: "+secs, 10, 12)
        DrawText("Min: "+mins, 80, 12)
        DrawText("Hour: "+hrs, 140, 12)
        DrawText("Day: "+dys, 200, 12)''''''''''''''''
        DrawText("Wood: "+wood, 400, 80)
      
      
      
      
        DrawImage farm, x2, y2

        DrawImage character, x, y
        Return 0
      
    End Method
  

  
End Class



Function Main:Int()
    New Game()
  
       Return 0
End Function
 
Last edited:
You really want to learn it all by yourself?
Here are some hints (not to be used as copy and paste to work):
DrawImage (character, MouseX(), MouseY()) 'Draws at current mouse coords

Field flagSticky.bool = False 'A Variable to decide if it stays at position or moves with the mouse

If MouseHit()
flagSticky = Not flagSticky 'switches the flag on and off after each mouse click.
End
 
Sorry i wanted all of it hints are fine I can try to make them work and if they wont work then ask why :/
I will try it out tomorrow and post the results for it later on.
 
Last edited:
i have wrote the code now and i don't have any errors ( apart from fatal error about lack of free space). I'm asking you to see if my assumption is correct. I'm thinking that I need to create a little if statement, maybe in OnRender, that will tell the drawimage farm to follow mouse if false and if true then it will stay. Am I correct?
 
Ok I have made it work. Here's the code I have used:

Code:
Strict

Import mojo




Class Game Extends App
       
              
      
      
'timer
    Field lastTick:Int
    Field secs:Int
    Field mins:Int
    Field hrs:Int
    Field dys:Int
 
  'resources
    Field wood:Float
     Field loopedtimeforwood:Int
    
     Field y2:Float
     Field x2:Float
     Field flagSticky:Bool = False
     Field flagSticky2:Bool = True
'character
    Field x:Float = 575
    Field y:Float = 420
    Field size:Float = 10
    Field BorderXMin:Float = 1
    Field BorderXMax:Float = 1270
    Field BorderYMin:Float = 25
    Field BorderYMax:Float = 870
   
     Field character:Image
     Field farm:Image
    Field coord1:Float
    Field coord2:float
     Field p1:Game
    

   
   
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

    
    Method OnCreate:Int()
        SetUpdateRate(60)
        lastTick = Millisecs()
        loopedtimeforwood = 0
        wood = 0
       
        SetDeviceWindow(1280,960,0)
       
   
       
        'character
        farm = LoadImage("ground.png")
        character = LoadImage("character.png")
       
        SetUpdateRate 60
       
       
       
        Return 0
       
    End Method
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
    Method OnUpdate:Int()
        Local tick:Int = Millisecs()
        If tick>=(lastTick+1000)
            lastTick = tick
            secs += 1
            loopedtimeforwood+=1
        Endif
        If secs > 59 Then
            secs = 0
            mins +=1
            If mins > 59 Then
                mins = 0
                hrs +=1
                If hrs > 23 Then
                    hrs = 0
                    dys += 1
                Endif
            Endif
        Endif
       
       If loopedtimeforwood >= 20
               wood+=1
               If KeyDown (KEY_A) Then wood+=1
           loopedtimeforwood =0
        End
       
       x = Clamp(x, BorderXMin, BorderXMax - size)
       y = Clamp(y, BorderYMin, BorderYMax - size)
             
       If x2 < MouseX() Then x2+=40
       If x2 > MouseX() Then x2-=40
       If y2 < MouseY() Then y2+=40
       If y2 > MouseY() Then y2-=40
      
       If MouseHit()
               flagSticky = Not flagSticky
               coord1 = x2
               coord2 = y2
       End
      
        If MouseHit()
               flagSticky2 = Not flagSticky

       end
                  
       If KeyDown (KEY_LEFT) Then x = x - 4
       If KeyDown (KEY_RIGHT) Then x = x + 4
       If KeyDown (KEY_UP) Then y = y-4
       If KeyDown (KEY_DOWN) Then y = y +4
       'keydown means keep moving until key is down where keyhit is do a thing until
      
     
      
        Return 0
    End Method
    Method OnRender:Int()
       
        Cls 124, 256, 0
        DrawText("Mins: "+secs, 10, 12)
        DrawText("Min: "+mins, 80, 12)
        DrawText("Hour: "+hrs, 140, 12)
        DrawText("Day: "+dys, 200, 12)''''''''''''''''
        DrawText("Wood: "+wood, 400, 80)
       
       
       
        If flagSticky = false
            DrawImage farm, x2, y2
        End
        If flagSticky2 = false
       
        DrawImage farm, coord1, coord2
        End
       
        DrawImage character, x, y
        Return 0
       
    End Method
   

   
End Class



Function Main:Int()
    New Game()
   
       Return 0
End Function
 
A flagSticky flag that says something is to follow the mouse is a good idea. You also don't need separate keys for 'stick farm' and 'unstick farm' - you can use 1 for farm, 2 for tree and so on, and just remember an int value that says which item is selected to be carried by the mouse.

Later on you could click on a farm or tree icon to set the correct int value, and you'd have something approaching a standard game interface.
 
Yeah, I agree. What I planned to do is to make a little If statement that will use counter, for example: if keyhit 1 then counter = 1 which allows me to move farm, 2 for mine 3 for whatever else.
 
The farm is not moving smoothly with the mouse. Is this intended?
Maybe it is time to make a class to get you into object orientation!?
 
This is your code modified with a class for storing the data of the game objects.
Code:
Strict
Import mojo

'This class is just something like a container for data that belongs together.
' ... This is only the beginning. You can do a lot more with classes!
Class GameObjectClass
    Field x:Float
    Field y:Float
    Field img:Image
End Class


Class Game Extends App
       
    'timer
    Field lastTick:Int
    Field secs:Int
    Field mins:Int
    Field hrs:Int
    Field dys:Int
    'resources
    Field wood:Float
    Field loopedtimeforwood:Int
 
    Field y2:Float
    Field x2:Float
    Field flagSticky:Bool = False
  
    'character
    Field x:Float = 575
    Field y:Float = 420
    Field size:Float = 10
    Field BorderXMin:Float = 1
    Field BorderXMax:Float = 1270
    Field BorderYMin:Float = 25
    Field BorderYMax:Float = 870
 
'    Field character:Image
'    Field farm:Image
  
    Field characterObj:GameObjectClass
    Field farmObj:GameObjectClass
    Field curGameObj:GameObjectClass
  
    Field coord1:Float
    Field coord2:float
    Field p1:Game
 
    Method OnCreate:Int()
        SetUpdateRate(60)
        lastTick = Millisecs()
        loopedtimeforwood = 0
        wood = 0
     
        SetDeviceWindow(1280, 960, 0)
     
'        'character
'        farm = LoadImage("ground.png")
'        character = LoadImage("character.png")
      
        SetUpdateRate 60
      
        'Create the Class objects
        farmObj = New GameObjectClass()
        characterObj = New GameObjectClass()
 
        'load the images
        farmObj.img = LoadImage("ground.png")
        characterObj.img = LoadImage("character.png")
      
        'Set character as the default object
           curGameObj = characterObj     
     
        Return 0
     
    End Method
 
 
 
    Method OnUpdate:Int()
        Local tick:Int = Millisecs()
        If tick>=(lastTick+1000)
            lastTick = tick
            secs += 1
            loopedtimeforwood+=1
        Endif
        If secs > 59 Then
            secs = 0
            mins +=1
            If mins > 59 Then
                mins = 0
                hrs +=1
                If hrs > 23 Then
                    hrs = 0
                    dys += 1
                Endif
            Endif
        Endif
     
        If loopedtimeforwood >= 20
            wood+=1
            If KeyDown (KEY_A) Then wood+=1
            loopedtimeforwood =0
        End
         
        'If 1 or 2 is hit, select the gameObject
        If KeyHit(KEY_1)
            curGameObj = characterObj
        EndIf
      
        If KeyHit(KEY_2)
            curGameObj = farmObj
        EndIf
      
      
        x = Clamp(x, BorderXMin, BorderXMax - size)
        y = Clamp(y, BorderYMin, BorderYMax - size)
           
'        If x2 < MouseX() Then x2+=40
'        If x2 > MouseX() Then x2-=40
'        If y2 < MouseY() Then y2+=40
'        If y2 > MouseY() Then y2-=40
       
      

        If MouseHit()
            flagSticky = Not flagSticky
        End
      
         If not flagSticky
            curGameObj.x = MouseX()
            curGameObj.y = MouseY()
        EndIf

               
        If KeyDown (KEY_LEFT) Then x = x - 4
        If KeyDown (KEY_RIGHT) Then x = x + 4
        If KeyDown (KEY_UP) Then y = y-4
        If KeyDown(KEY_DOWN) Then y = y + 4
        'keydown means keep moving until key is down where keyhit is do a thing until
   
   
   
        Return 0
    End Method
    Method OnRender:Int()
     
        Cls 124, 256, 0
        DrawText("Mins: "+secs, 10, 12)
        DrawText("Min: "+mins, 80, 12)
        DrawText("Hour: "+hrs, 140, 12)
        DrawText("Day: "+dys, 200, 12)''''''''''''''''
        DrawText("Wood: "+wood, 400, 80)
     
     
     
        DrawImage(curGameObj.img, curGameObj.x, curGameObj.y)

     
        DrawCircle(x, y, 20)
        Return 0
     
    End Method
 
 
End Class
Function Main:Int()
    New Game()
 
    Return 0
End Function
 
The farm is not moving smoothly with the mouse. Is this intended?
Maybe it is time to make a class to get you into object orientation!?
Yeah, it is not intentional for the object to lag behind the mouse. I tried to increase the update but then it was just bad ( I forgot how it looked).
 
I've copied the code to test it and I see that the code is neater than it was before and it works as I would like it to too. There are 2 reason I haven used other classes: 1) I just couldn't make them work and 2) I hate oop even since we got introduced to it in school using python xP. I'll try to morph both codes together and make it so when i press 1 object will appear and be placeable and then press 2 for another one and repeat ( I will try to use classes).

I assume I can call class whatever?
 
Maybe it is because you had it in school. I had Logo and Pascal in school and also avoided this in my spare time.
I wrote some Apps in PureBasic (no oop) and in larger projects (>3000 lines) it allways happend that function names got longer and longer and in a way my own conventions for variable names were as complex (G_MainWindow_BtnOK_RequesterText) as learning oop. Than I got into monkey x and really enjoyed it. With oop I can, while writing one class, forget the rest of the code with all its dependencies.
 
I've added another sprite to the list, however when I press 2, for example, all other sprites disappear and dont appear until the number is pressed (they stay at the same place where they disappeared)

How do I make them stay?
 
OK, now I think I know what you want to achieve: You want to place a farm, each time you click the mouse at its location, right?
In this case you don't need to switch from sticky to non-sticky, you just have to create a new object at MouseX,MouseY.
Then in OnRender() you draw all those Objects. To store all those objects you can use a stack.
 
I managed to make memory access violation xDDD


Code:
Strict

Import mojo
' this class is used for
Class imageposition
    Field x:Float
    Field y:Float
    Field img:Image
End Class

Class Game Extends App
       
              
      
      
    'timer
    Field lastTick:Int
    Field secs:Int
    Field mins:Int
    Field hrs:Int
    Field dys:Int
 
    'resources
    Field wood:Float
     Field loopedtimeforwood:Int
    
     'coordinates to follow the mouse
     Field y2:Float
     Field x2:Float
     Field flagSticky:Bool = False
     Field flagSticky2:Bool = False

    Field farmcoordx:Float
    Field farmcoordy:Float

   
    'character coordinates
    Field x:Float = 575
    Field y:Float = 420
    Field size:Float = 10
    Field BorderXMin:Float = 1
    Field BorderXMax:Float = 1270
    Field BorderYMin:Float = 25
    Field BorderYMax:Float = 870
   
    'objects
     Field character:imageposition
     Field farm:imageposition
    Field mine:imageposition
    Field iron_mine:imageposition
    Field smith:imageposition
    Field currentobject:imageposition
    Field nothing:imageposition
   
    'coordinats and counter for object to stay at mouse saved location
    Field coord1:Float
    Field coord2:Float
    Field counter:Float = 0
   
     Field p1:Game
    

   
    Field objects:Stack<Image> = new Stack<Image>()
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

    
    Method OnCreate:Int()
        SetUpdateRate(60)
        lastTick = Millisecs()
        loopedtimeforwood = 0
        wood = 0
       
        SetDeviceWindow(1280,960,0)
       
   
        farm = New imageposition()
        character = New imageposition()
        mine = New imageposition()
        nothing = New imageposition()
       
        'character
        farm.img = LoadImage("ground.png")
        character.img = LoadImage("character.png")
        mine.img = LoadImage("stone_mine.png")
        nothing.img = LoadImage("nothing.png")
        SetUpdateRate 60
       
        currentobject = nothing
       
        Return 0
       
    End Method
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
    Method OnUpdate:Int()
        Local tick:Int = Millisecs()
        If tick>=(lastTick+1000)
            lastTick = tick
            secs += 1
            loopedtimeforwood+=1
        Endif
        If secs > 59 Then
            secs = 0
            mins +=1
            If mins > 59 Then
                mins = 0
                hrs +=1
                If hrs > 23 Then
                    hrs = 0
                    dys += 1
                Endif
            Endif
        Endif
       
       If loopedtimeforwood >= 20
               wood+=1
               If KeyDown (KEY_A) Then wood+=1
           loopedtimeforwood =0
        End
       
       x = Clamp(x, BorderXMin, BorderXMax - size)
       y = Clamp(y, BorderYMin, BorderYMax - size)
             
'       If x2 < MouseX() Then x2+=40
'       If x2 > MouseX() Then x2-=40
'       If y2 < MouseY() Then y2+=40
'       If y2 > MouseY() Then y2-=40

       If MouseHit()
               currentobject.x = MouseX()
            currentobject.y = MouseY()
             objects.Push (currentobject.img)
       End
      

              
  
        If Not flagSticky
            currentobject.x = MouseX()
            currentobject.y = MouseY()
            flagSticky2 = true
        endif




       If KeyHit(KEY_1)
               currentobject = farm

       Endif
      
       If KeyHit(KEY_2)
               currentobject = mine
       Endif
      
       If KeyHit(KEY_3)
               currentobject = character
       Endif
      
       If KeyHit(KEY_0)
               currentobject = nothing
       Endif
      
'       If KeyHit(KEY_A)
'           counter = 1
'           flagSticky2 = True
'       Endif
'      
'       If Not flagSticky2
'               farmcoordx = MouseX()
'               farmcoordy = MouseY()
'       Endif
'      
'       If counter = 1
'           farmcoordx = MouseX()
'           farmcoordy = MouseY()
'       endif
'       If KeyHit(KEY_S)
'           counter = 2
'       Endif
      
        If KeyDown (KEY_LEFT) Then x = x - 4
        If KeyDown (KEY_RIGHT) Then x = x + 4
        If KeyDown (KEY_UP) Then y = y-4
        If KeyDown (KEY_DOWN) Then y = y +4
       'keydown means keep moving until key is down where keyhit is do a thing until
      
     
      
        Return 0
    End Method
    Method OnRender:Int()
       
        Cls 124, 256, 0
        DrawText("Mins: "+secs, 10, 12)
        DrawText("Min: "+mins, 80, 12)
        DrawText("Hour: "+hrs, 140, 12)
        DrawText("Day: "+dys, 200, 12)''''''''''''''''
        DrawText("Wood: "+wood, 400, 80)
       
        objects.Pop ()
        DrawImage(currentobject.img, currentobject.x, currentobject.y)




'        If counter = 1
'           If flagSticky = False
    '            DrawImage farm, x2, y2
    '        Endif
    '        If flagSticky2 = False
    '       
    '        DrawImage farm, coord1, coord2
    '        Endif
    '    end
        DrawImage (character.img, x, y)
        Return 0
       
    End Method
   

   
End Class



Function Main:Int()
    New Game()
   
       Return 0
End Function
 
For Stacks watch this video. The other videos of him also tought me a lot at the beginning.
 
You're pushing once in OnUpdate() when a key is hit, then you're trying to pop every frame in OnRender(). Also, you're doing nothing with the popped image anyway! What is the purpose of the stack of images? The images are all there to be accessed anytime.
 
Here is how I would do it. I am not sure how to create the new objects properly for the stack. Better solutions are wellcome...
This way you can access all the objects later.
@Gerry Quinn Any complaints about the stack of images with coordinates used this way?
Code:
Strict
Import mojo
' this class is used for
Class Imageposition
    Field x:Float
    Field y:Float
    Field img:Image
End Class
Class Game Extends App
      
            
    
    
    'timer
    Field lastTick:Int
    Field secs:Int
    Field mins:Int
    Field hrs:Int
    Field dys:Int
    'resources
    Field wood:Float
    Field loopedtimeforwood:Int
  
    'coordinates to follow the mouse
    Field y2:Float
    Field x2:Float
    Field flagSticky:Bool = False
    Field flagSticky2:Bool = False
    Field farmcoordx:Float
    Field farmcoordy:Float
  
    'character coordinates
    Field x:Float = 575
    Field y:Float = 420
    Field size:Float = 10
    Field BorderXMin:Float = 1
    Field BorderXMax:Float = 1270
    Field BorderYMin:Float = 25
    Field BorderYMax:Float = 870
  
    'objects
    Field character:Imageposition
    Field farm:Imageposition
    Field mine:Imageposition
    Field iron_mine:Imageposition
    Field smith:Imageposition
    Field currentobject:Imageposition
    Field nothing:Imageposition
  
    'coordinats and counter for object to stay at mouse saved location
    Field coord1:Float
    Field coord2:Float
    Field counter:Float = 0
  
    Field p1:Game
  
  
    Field objects:Stack<Imageposition> = New Stack<Imageposition>()
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
    Method OnCreate:Int()
        SetUpdateRate(60)
        lastTick = Millisecs()
        loopedtimeforwood = 0
        wood = 0
      
        SetDeviceWindow(1280,960,0)
      
  
        farm = New Imageposition()
        character = New Imageposition()
        mine = New Imageposition()
        nothing = New Imageposition()
      
        'character
        farm.img = LoadImage("ground.png")
        character.img = LoadImage("character.png")
'        mine.img = LoadImage("stone_mine.png")
'        nothing.img = LoadImage("nothing.png")
        SetUpdateRate 60
      
        currentobject = character
      
        Return 0
      
    End Method
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
    Method OnUpdate:Int()
        Local tick:Int = Millisecs()
        If tick>=(lastTick+1000)
            lastTick = tick
            secs += 1
            loopedtimeforwood+=1
        Endif
        If secs > 59 Then
            secs = 0
            mins +=1
            If mins > 59 Then
                mins = 0
                hrs +=1
                If hrs > 23 Then
                    hrs = 0
                    dys += 1
                Endif
            Endif
        Endif
      
        If loopedtimeforwood >= 20
            wood+=1
            If KeyDown (KEY_A) Then wood+=1
            loopedtimeforwood =0
        End
      
        x = Clamp(x, BorderXMin, BorderXMax - size)
        y = Clamp(y, BorderYMin, BorderYMax - size)
                          
        currentobject.x = MouseX()
        currentobject.y = MouseY()
           
         If MouseHit()
            Local obj:Imageposition = New Imageposition()
            obj.img = currentobject.img
            obj.x = currentobject.x
            obj.y = currentobject.y
            objects.Push(obj)
        End

        If KeyHit(KEY_1)
            currentobject = farm
        Endif
    
        If KeyHit(KEY_2)
            currentobject = character
        Endif
    
    
    
        If KeyDown (KEY_LEFT) Then x = x - 4
        If KeyDown (KEY_RIGHT) Then x = x + 4
        If KeyDown(KEY_UP) Then y = y - 4
        If KeyDown (KEY_DOWN) Then y = y +4
        'keydown means keep moving until key is down where keyhit is do a thing until
    
    
    
        Return 0
    End Method
    Method OnRender:Int()
      
        Cls 124, 256, 0
        DrawText("Mins: "+secs, 10, 12)
        DrawText("Min: "+mins, 80, 12)
        DrawText("Hour: "+hrs, 140, 12)
        DrawText("Day: "+dys, 200, 12)''''''''''''''''
        DrawText("Wood: "+wood, 400, 80)
      
       
        For Local obj:Imageposition = EachIn objects
            DrawImage(obj.img, obj.x, obj.y)
        Next
       
       
         DrawImage(currentobject.img, currentobject.x, currentobject.y)
        DrawImage (character.img, x, y)
        Return 0
      
    End Method
  
  
End Class
Function Main:Int()
    New Game()
  
    Return 0
End Function
 
Back
Top Bottom