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 Block = require 'nodes/block' | |
local controls = require 'controls' | |
local Floorspace = {} | |
Floorspace.__index = Floorspace | |
--===================== | |
--Following line is new | |
--===================== | |
Floorspace.isReloadable = 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
--a snippet of how player.lua might function | |
local currentState = sm.wielding.lookup | |
local pose = currentState.pose | |
local keydown_DOWN = controls.isDown( 'DOWN' ) | |
--at keyPress | |
if currentState.key then | |
currentState = currentState.key |
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
----------------------------------------------- | |
-- mace.lua | |
-- Represents a mace that a player can wield or pick up | |
-- Created by NimbusBP1729 | |
----------------------------------------------- | |
local Weapon = require 'nodes/weapon' | |
local utils = require 'utils' | |
local Mace = {} | |
Mace.__index = Mace |
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 what we generally do | |
local Alpha = {} | |
Alpha.__index = Alpha | |
Alpha.alpha = true | |
--many lines of code later: | |
--to test a node's type: | |
if node.alpha then |
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
Your master branch should always be an exact mirror of the upstream master: | |
Add upstream as a remote repository ( only need to do this one time ever ): git remote add upstream https://github.com/kyleconroy/hawkthorne-journey.git | |
Everytime you want to sync master, run the following 3 commands: | |
git checkout master (next do 'git fetch upstream') | |
git pull upstream master | |
git push origin master | |
To do a new pull request: | |
Check out your master branch ( this will be used as the basis for your new branch ) |
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
----------------------------------------------- | |
-- leaf.lua | |
-- Represents a leaf when it is in the world | |
-- Created by HazardousPeach | |
----------------------------------------------- | |
local controls = require 'controls' | |
local Leaf = {} | |
Leaf.__index = Leaf |
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 plyr.new(sheet) | |
local new_plyr = {} | |
new_plyr.sheet = sheet | |
new_plyr.sheet:setFilter('nearest', 'nearest') | |
new_plyr.positions = position_matrix_main | |
local g = anim8.newGrid(48, 48, new_plyr.sheet:getWidth(), | |
new_plyr.sheet:getHeight()) | |
local warp = anim8.newGrid(36, 300, beam:getWidth(), |
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 the only method in my weapon file that is referenced without a semicolon | |
-- Creates a new weapon object | |
-- @return the weapon object created | |
function Weapon.addWeaponMethods(myWeapon) | |
for k,v in pairs(Weapon) do | |
if not myWeapon[k] then | |
myWeapon[k] = v | |
end | |
end |
NewerOlder