Search found 4 matches

by Chewynouget
Sat Apr 19, 2014 10:39 pm
Forum: Support and Development
Topic: Inheriting code base and values
Replies: 1
Views: 968

Inheriting code base and values

Hi there, I have a class with this set of values and functions: require("class") entity = class:new() function entity:new() self.x = 100 self.y = 100 self.width = 32 self.height = 32 self.info = "entity" self.alive = true self.color = {r = 255, g = 0, b = 0} return self end funct...
by Chewynouget
Fri Apr 18, 2014 1:02 am
Forum: Support and Development
Topic: Help with Inheritance, Shaders and Joysticks
Replies: 4
Views: 1758

Re: Help with Inheritance, Shaders and Joysticks

Thanks for that! The Joysticks are working now. Do you know where I can find some examples of shaders in love2d? Also, I have this new thing I need some help with. I'm trying to find a way that I could add multiple classes to the game. I mean, say I have a platformer, I can add a player, but how do ...
by Chewynouget
Wed Apr 16, 2014 5:38 pm
Forum: Support and Development
Topic: Help with Inheritance, Shaders and Joysticks
Replies: 4
Views: 1758

Re: Help with Inheritance, Shaders and Joysticks

Thanks for the help, Kingdaro! function love.load( ... ) -- body px = 100 py = 100 end function love.draw( ... ) -- body love.graphics.rectangle("fill", px, py, 100, 100) end function love.update( ... ) -- body if Joystick:isDown(0,0) then px = px + 1 end end This is a simple example of th...
by Chewynouget
Wed Apr 16, 2014 3:35 pm
Forum: Support and Development
Topic: Help with Inheritance, Shaders and Joysticks
Replies: 4
Views: 1758

Help with Inheritance, Shaders and Joysticks

Hi there. I've been trying out Love2D in the past few days and Loving it. But I have a few questions about Love usage / Lua: Inheritance How does class inheritance work in Lua? I come from an Actionscript background if that helps. Shaders in 0.9.0 There are a lot of Shader tutorials written in 0.8.0...