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
| extends Node | |
| #heroGenerator.gd | |
| #makes a level 1 hero with random class and name | |
| var nameGenerator = load("res://nameGenerator.gd").new() | |
| var humanFemaleHeads = ["human_female_01.png", "human_female_02.png", "human_female_03.png", "human_female_04.png", "human_female_05.png", "human_female_06.png", "human_female_07.png", "human_female_08.png", "human_female_09.png", "human_female_10.png", "human_female_11.png"] | |
| var humanMaleHeads = ["human_male_01.png", "human_male_02.png", "human_male_03.png", "human_male_04.png", "human_male_05.png", "human_male_06.png", "human_male_07.png", "human_male_08.png", "human_male_08.png", "human_male_09.png"] | |
| var elfFemaleHeads = ["elf_female_01.png"] | |
| func _ready(): |
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
| #the new hero is the last thing in the roster, so grab it out of the back | |
| var lastIndex = global.guildRoster.size() - 1 | |
| global.selectedHero = global.guildRoster[lastIndex] | |
| var heroScene = preload("res://hero.tscn").instance() | |
| heroScene.set_instance_data(global.selectedHero) | |
| heroScene._draw_sprites() | |
| heroScene.set_position(Vector2(240, 80)) #screen is 540 wide | |
| heroScene.set_display_params(false, true) #walking enabled?, show name | |
| add_child(heroScene) |
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
| /* Parsely v.0.1 | |
| Developed for Guild Leader project (December 2018) | |
| To use: place .json files in parsely/names, parsely/staticData, parsely/timedNodeData, etc. | |
| In Terminal: | |
| node parsely.js | |
| Exported .gd files are placed directly in gameData folder. |
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
| group: auto_dealer_schema | |
| Model = { | |
| model_id:number, model_name:string, first_production_year:string | |
| 1,'XJS','1987' | |
| 2,'XK120','1948' | |
| 3,'Camaro','1966' | |
| 4,'GT','2005' | |
| 5,'Boss 302 Mustang','1969' | |
| 6,'P1800','1961' |
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
| /* Default styles for the Amazin' Featured Box */ | |
| .amazin-featured-box { | |
| border:1px solid grey; | |
| box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); | |
| padding:0px; | |
| width:80%; | |
| margin:30px auto !important; | |
| } | |
| .amazin-featured-box p, .amazin-featured-box h2, .amazin-featured-box h3 { |
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
| .amazin-featured-box { | |
| border:none; | |
| } | |
| .amazin-featured-box-text { | |
| padding:26px !important; | |
| } | |
| .amazin-featured-box-text, .amazin-featured-box-text p { | |
| margin:0px !important; | |
| font-family:"Inter var", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, sans-serif !important; |
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
| .amazin-product-box { | |
| background-color:#ffffff; | |
| color:#181c1a; | |
| } | |
| .amazin-product-box h3 { | |
| margin:16px 0px; | |
| } | |
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
| // Closure example, sort of a companion to my JS example: | |
| // https://repl.it/@MandiGrant/JSClosureExample | |
| // combineNames is a function that returns a function. | |
| var combineNames = (firstName) { | |
| return (lastName) => firstName + ' ' + lastName; | |
| }; | |
| void main() { | |
| // Call it with a first name and then call *that* function with a last name |
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
| // Closure example, sort of a companion to my JS example: | |
| // https://repl.it/@MandiGrant/JSClosureExample | |
| // combineNames is a function that returns a function. | |
| var combineNames = (firstName) { | |
| return (lastName) => firstName + ' ' + lastName; | |
| }; | |
| /* If you call it like this, |
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
| let allPosts = [ {id: 123, name: "test post 1"}, | |
| {id: 456, name: "test post 2"} | |
| ]; | |
| let allReplies = [ {id: 1, replyTo: 123, name: 'reply 1', read: false}, | |
| {id: 2, replyTo: 123, name: 'reply 2', read: false}, | |
| {id: 3, replyTo: 456, name: 'reply 3', read: false} | |
| ]; | |
| // simulate a server response with 1s wait time | |
| const getRepliesToPost = async (id: number) => { |