[solved]Cupid in game console + OOP = no draw???

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
BlackDiamondPL
Prole
Posts: 15
Joined: Tue Aug 08, 2017 8:38 pm

[solved]Cupid in game console + OOP = no draw???

Post by BlackDiamondPL »

I wanted to test some OOP in Lua.
And it works fine. So i have created 'Player' class.
Added draw. And this is the moment where problem beholds.
Drawing player without cupid console works just fine but when i require cupid
nothing gets drawn.

Why is that? and how to fix it?
What can i think of now is to create a canvas and then draw game to it, leaving cupid's draw alone.

If someone needs .love file there it is :
Attachments
class.love
(12.3 KiB) Downloaded 135 times
Last edited by BlackDiamondPL on Sun Aug 27, 2017 9:12 pm, edited 1 time in total.
User avatar
MadByte
Party member
Posts: 533
Joined: Fri May 03, 2013 6:42 pm
Location: Braunschweig, Germany

Re: Cupid in game console + OOP = no draw???

Post by MadByte »

I've never heard of that lib before. Next time you should add a link or a description.
The bitbucket page of the lib says that you have to put it in the first line of your conf.lua, not in the main.lua.
Seems to work kinda, at least the error catching... but pressing "~" didn't opened a console for me.
You also may want to make sure that this lib is compatible with the LÖVE version you're using...
BlackDiamondPL
Prole
Posts: 15
Joined: Tue Aug 08, 2017 8:38 pm

Re: Cupid in game console + OOP = no draw???

Post by BlackDiamondPL »

Geez that was simple.
My lazy brain can not think about checking what's written on lib's page. Just download and use as normal.
It's working as should.

And also maybe "~" is not supported for your system or version of Love your using,but you can change it.
Post Reply

Who is online

Users browsing this forum: No registered users and 212 guests