aboutsummaryrefslogtreecommitdiff
path: root/main.lua
diff options
context:
space:
mode:
author1029chris <1029chris@gmail.com>2016-05-03 18:10:18 -0700
committer1029chris <1029chris@gmail.com>2016-05-03 18:10:18 -0700
commit8c831056c9e5f22e504f9d7e57b7fe35b17cc617 (patch)
tree8469d79fb193b2af464460e7eadbc854fd9877ee /main.lua
parent48b794b936f987b0283342ca385d77b5b8ec95f9 (diff)
Implimented new loading system
webpages now load
Diffstat (limited to 'main.lua')
-rw-r--r--main.lua38
1 files changed, 16 insertions, 22 deletions
diff --git a/main.lua b/main.lua
index 6c3aa07..a24a72d 100644
--- a/main.lua
+++ b/main.lua
@@ -15,21 +15,7 @@ function love.load()
require "elements"
require "virus1"
require "dialogue"
- love.graphics.setDefaultFilter("nearest", "nearest")
- love.graphics.setBackgroundColor(0, 0, 0)
- love.graphics.setNewFont()
- pressstart = love.graphics.newFont("fonts/pressstart.ttf", 12)
- pressstart:setFilter("nearest", "nearest")
- --pressstarts = love.graphics.newFont("fonts/pressstart.ttf", 10)
- --pressstarts:setFilter("nearest", "nearest")
- pixeloperatorb = love.graphics.newFont("fonts/pixel_operator/PixelOperator8-Bold.ttf", 16)
- pixeloperatorb:setFilter("nearest", "nearest")
- pixeloperator = love.graphics.newFont("fonts/pixel_operator/PixelOperator8.ttf", 16.5)
- pixeloperator:setFilter("nearest", "nearest")
- pixeloperators = love.graphics.newFont("fonts/pixel_operator/PixelOperator-Bold.ttf", 16)
- pixeloperators:setFilter("nearest", "nearest")
- love.graphics.setFont(pressstart)
- love.keyboard.setKeyRepeat(true)
+ loadPre()
--loadAssets()
--loadVar()
--loadDia()
@@ -49,8 +35,14 @@ function love.update(dt)
end
if love.keyboard.isDown("f4") == true then
love.window.setMode(800, 600, {fullscreen=true, fullscreentype="desktop"})
+ for i=1,#win do
+ win[i].update = true
+ end
elseif love.keyboard.isDown("f5") == true then
love.window.setMode(1280, 720, {fullscreen=false})
+ for i=1,#win do
+ win[i].update = true
+ end
end
if fade == 1 and fadeOpacity ~= 255 then
fadeOpacity = fadeOpacity + 5
@@ -60,13 +52,15 @@ function love.update(dt)
if scene == 1 then
updateSystem(dt)
end
- if v1.yes == true then
- v1.timer = v1.timer + dt
- end
- if v1.yes == true and v1.timer >= 5 then
- scene = 2
- if v1.explodeintrotimer <= 7.8 then
- v1.explodeintrotimer = v1.explodeintrotimer + dt
+ if loaded == true then
+ if v1.yes == true and v1.complete == false then
+ v1.timer = v1.timer + dt
+ end
+ if v1.yes == true and v1.timer >= 5 then
+ scene = 2
+ if v1.explodeintrotimer <= 7.8 then
+ v1.explodeintrotimer = v1.explodeintrotimer + dt
+ end
end
end
end