This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- inculdes | |
| local sound = require 'vendor/TEsound' | |
| local Timer = require 'vendor/timer' | |
| local tween = require 'vendor/tween' | |
| local function dance(npc, level, time) | |
| npc.state = "dancing" | |
| npc.busy = true | |
| Timer.add(time, function() | |
| npc.state = "default" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- inculdes | |
| return { | |
| width = 32, | |
| height = 25, | |
| animations = { | |
| default = { | |
| 'loop',{'1-2,1'},.5, | |
| }, | |
| walking = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local Timer = require 'vendor/timer' | |
| local anim8 = require 'vendor/anim8' | |
| local sound = require 'vendor/TEsound' | |
| local Wall = {} | |
| Wall.__index = Wall | |
| local crack = love.graphics.newImage('images/blocks/crack.png') | |
| function Wall.new(node, collider) | |
| local wall = {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- inculdes | |
| local sound = require 'vendor/TEsound' | |
| local Timer = require('vendor/timer') | |
| local tween = require 'vendor/tween' | |
| local character = require 'character' | |
| local gamestate = require 'vendor/gamestate' | |
| local utils = require 'utils' | |
| require 'utils' | |
| local anim8 = require 'vendor/anim8' | |
| local Dialog = require 'dialog' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function love.load() | |
| joystick = love.joystick.getJoysticks()[1] | |
| position = {x = 400, y = 300} | |
| speed = 300 | |
| end | |
| function love.draw() | |
| local joysticks = love.joystick.getJoysticks() | |
| for i, joystick in ipairs(joysticks) do | |
| love.graphics.print(joystick:getName(), 10, i * 20) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local anim8 = require 'vendor/anim8' | |
| local app = require 'app' | |
| local Dialog = require 'dialog' | |
| local window = require "window" | |
| local sound = require 'vendor/TEsound' | |
| local fonts = require 'fonts' | |
| local utils = require 'utils' | |
| local Timer = require 'vendor/timer' | |
| local Menu = {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --this is an example of what talk_items could look like in the npc's file | |
| { ['text']='test', affectionMin=200, affectionMax=400 }, | |
| --in iventory before you load the table of commands run function commandUpdate() to add/remove based on affection level | |
| update = function(dt, npc, player) | |
| local talkTable = (talk_items or {}) --self.commands[item.text] | |
| local affection = player.affection.hilda or 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --this is an example of what talk_items could look like in the npc's file | |
| { ['text']='flowers', freeze = true, affection = 5 }, | |
| --The first for loop looks for the "options” key in the root table of the talk_items. Inside this table we can look for all items in the table that have an affection attribute. | |
| --If the affection attribute is lower than the player affection then we remove the item from the table. | |
| function Menu:itemUpdate( npc, player) | |
| --adds and removes items from the talk items based on affection level | |
| local Player = require 'player' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local Timer = require 'vendor/timer' | |
| local Level = require 'level' | |
| local anim8 = require 'vendor/anim8' | |
| local sound = require 'vendor/TEsound' | |
| local Dialog = require 'dialog' | |
| local Wall = {} | |
| Wall.__index = Wall | |
| Wall.isWall = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local Enemy = require 'nodes/enemy' | |
| local gamestate = require 'vendor/gamestate' | |
| local sound = require 'vendor/TEsound' | |
| local Timer = require 'vendor/timer' | |
| local Projectile = require 'nodes/projectile' | |
| local sound = require 'vendor/TEsound' | |
| local utils = require 'utils' | |
| local window = require 'window' | |
| local camera = require 'camera' |
OlderNewer