aboutsummaryrefslogtreecommitdiffstats
path: root/Scripts/init.lua
diff options
context:
space:
mode:
authorAndy Belle-Isle <drumsetmonkey@gmail.com>2019-09-02 00:08:38 -0400
committerAndy Belle-Isle <drumsetmonkey@gmail.com>2019-09-02 00:08:38 -0400
commit7f66a924156e6baa9110e2e023e3a24c31ce95d3 (patch)
treecd15542fcebdec4d49af9fae1f4867a1f3947094 /Scripts/init.lua
parent1ecf176a48d8a3e4e17df2ebcc4f8974cd1ce023 (diff)
Added LIGHTING
Diffstat (limited to 'Scripts/init.lua')
-rw-r--r--Scripts/init.lua45
1 files changed, 45 insertions, 0 deletions
diff --git a/Scripts/init.lua b/Scripts/init.lua
index 9983c98..37b1f0d 100644
--- a/Scripts/init.lua
+++ b/Scripts/init.lua
@@ -17,6 +17,12 @@ bird = {
texture = "Assets/player.png",
visible = true
},
+ Light = {
+ r = 1.0,
+ g = 1.0,
+ b = 1.0,
+ strength = 1.0
+ },
Idle = function(self)
--if (self.visibleTick >= 20) then
-- self.Render.visible = not self.Render.visible
@@ -38,6 +44,7 @@ cat = {
},
Render = {
texture = "Assets/cat.png",
+ normal = "Assets/cat_normal.png",
visible = true
},
Init = function(self)
@@ -61,6 +68,12 @@ animal = {
texture = "Assets/rabbit.png",
visible = true
},
+ Light = {
+ r = 0.0,
+ b = 1.0,
+ g = 0.2,
+ strength = 2.0
+ },
Idle = function(self)
self.Velocity.x = -200 * math.sin(math.rad(self.counter));
self.Velocity.y = 500 * math.cos(math.rad(self.counter*5));
@@ -69,8 +82,40 @@ animal = {
counter = 0;
}
+wall = {
+ Position = {
+ y = -100
+ },
+ Render = {
+ texture = "Assets/rock.png",
+ normal = "Assets/rock_normal.png",
+ visible = true
+ }
+}
+
birdSpawn = game.spawn(bird);
dogSpawn = game.spawn(cat);
animalSpawn = game.spawn(animal);
+
+wallSpawn = game.spawn(wall);
+
+game.spawn({
+ Velocity = {
+ x = 0,
+ y = 0
+ },
+ Light = {
+ r = 0.8,
+ g = 0.1,
+ b = 0.2,
+ strength = 0.75
+ },
+ counter = 0;
+ Idle = function(self)
+ self.Velocity.x = -100 * math.sin(math.rad(self.counter));
+ self.Velocity.y = 100 * math.cos(math.rad(self.counter));
+ self.counter = self.counter + 5;
+ end
+});