1
0
mirror of https://github.com/Melon-Bread/Pet.GB synced 2024-11-24 20:58:19 -05:00

Going to bed 💤

This commit is contained in:
Rain Clark 2016-10-04 07:11:27 -04:00
parent 31a0388f28
commit b66edd9488
3 changed files with 268 additions and 89 deletions

View File

@ -3,6 +3,50 @@
{ {
"selected_items": "selected_items":
[ [
[
"W",
"Wait"
],
[
"Flx",
"FlxG\tflixel"
],
[
"it",
"itemLeave\tfunction"
],
[
"fa",
"fadeOut"
],
[
"tr",
"true"
],
[
"_spr",
"_sprInteraction\tvar"
],
[
"FlxC",
"FlxColor\tflixel.util"
],
[
"_in",
"_sprInteraction\tvar"
],
[
"_s",
"_sprInteraction"
],
[
"_sprin",
"_sprInteraction\tvar"
],
[
"_sprIn",
"_sprInteraction\tvar"
],
[ [
"check", "check",
"checkRange( )\tVoid" "checkRange( )\tVoid"
@ -23,10 +67,6 @@
"_st", "_st",
"_statDiscipline" "_statDiscipline"
], ],
[
"_s",
"_statMood"
],
[ [
"_", "_",
"_statAge" "_statAge"
@ -47,10 +87,6 @@
"E", "E",
"Egg_New__png\tString" "Egg_New__png\tString"
], ],
[
"_spr",
"_sprSelect\tflixel.FlxSprite"
],
[ [
"_m", "_m",
"_menuOption\tInt" "_menuOption\tInt"
@ -67,10 +103,6 @@
"tmp", "tmp",
"tmpSelect__png\tString" "tmpSelect__png\tString"
], ],
[
"Flx",
"FlxSprite\tclass"
],
[ [
"_sprS", "_sprS",
"_sprSelect\tflixel.FlxSprite" "_sprSelect\tflixel.FlxSprite"
@ -283,10 +315,6 @@
"ro", "ro",
"rotate(...)\tflixel.math.FlxPoint" "rotate(...)\tflixel.math.FlxPoint"
], ],
[
"FlxC",
"FlxColor"
],
[ [
"flix", "flix",
"flixel\tpackage" "flixel\tpackage"
@ -315,7 +343,7 @@
"file": "source/MenuState.hx", "file": "source/MenuState.hx",
"settings": "settings":
{ {
"buffer_size": 1634, "buffer_size": 1660,
"encoding": "UTF-8", "encoding": "UTF-8",
"line_ending": "Unix" "line_ending": "Unix"
} }
@ -330,19 +358,28 @@
} }
}, },
{ {
"file": "source/Gel.hx", "file": "source/HUD.hx",
"settings": "settings":
{ {
"buffer_size": 1670, "buffer_size": 6953,
"encoding": "UTF-8", "encoding": "UTF-8",
"line_ending": "Windows" "line_ending": "Windows"
} }
}, },
{ {
"file": "source/HUD.hx", "file": "source/Gel.hx",
"settings": "settings":
{ {
"buffer_size": 5591, "buffer_size": 2471,
"encoding": "UTF-8",
"line_ending": "Windows"
}
},
{
"file": "GelNotes.md",
"settings":
{
"buffer_size": 4278,
"encoding": "UTF-8", "encoding": "UTF-8",
"line_ending": "Windows" "line_ending": "Windows"
} }
@ -356,9 +393,53 @@
"command_palette": "command_palette":
{ {
"height": 357.0, "height": 357.0,
"last_filter": "imp", "last_filter": "mark",
"selected_items": "selected_items":
[ [
[
"mark",
"Markdown Preview: Export HTML in Sublime Text"
],
[
"ma",
"Markdown Preview: Copy to Clipboard"
],
[
"install",
"Package Control: Install Package"
],
[
"Todo",
"TodoReview: Open Files"
],
[
"intall",
"Package Control: Install Package"
],
[
"com",
"Git: Commit"
],
[
"add",
"Git: Add Current File"
],
[
"comm",
"Git: Quick Commit"
],
[
"in",
"Package Control: Install Package"
],
[
"git pu",
"Git: Push Current Branch"
],
[
"git a",
"Git: Quick Add"
],
[ [
"imp", "imp",
"Haxe: Organize Imports" "Haxe: Organize Imports"
@ -391,10 +472,6 @@
"re", "re",
"Package Control: Remove Package" "Package Control: Remove Package"
], ],
[
"install",
"Package Control: Install Package"
],
[ [
"remove", "remove",
"Package Control: Remove Package" "Package Control: Remove Package"
@ -468,7 +545,7 @@
"Package Control: Install Package" "Package Control: Install Package"
] ]
], ],
"width": 414.0 "width": 380.0
}, },
"console": "console":
{ {
@ -489,9 +566,19 @@
}, },
"expanded_folders": "expanded_folders":
[ [
"/C/Users/melon/Documents/Projects/Pet.GB",
"/C/Users/melon/Documents/Projects/Pet.GB/_tmp",
"/C/Users/melon/Documents/Projects/Pet.GB/assets/images"
], ],
"file_history": "file_history":
[ [
"/C/Users/melon/Documents/Projects/Pet.GB/_tmp/GelNotes.html",
"/C/Users/melon/Documents/Projects/Pet.GB/GelNotes.md",
"/C/Users/melon/Documents/Projects/Pet.GB/_tmp/MoodNotes.md",
"/C/HaxeToolkit/haxe/lib/flixel/4,1,1/flixel/text/FlxBitmapText.hx",
"/C/Users/melon/AppData/Roaming/Sublime Text 3/Packages/TodoReview/TodoReview.sublime-settings",
"/C/HaxeToolkit/haxe/lib/flixel/4,1,1/flixel/util/FlxSpriteUtil.hx",
"/C/Users/melon/Documents/Projects/Pet.GB/.gitignore",
"/C/Users/melon/Documents/Projects/PetGB/source/Main.hx", "/C/Users/melon/Documents/Projects/PetGB/source/Main.hx",
"/C/Users/melon/Documents/Projects/PetGB/Project.xml", "/C/Users/melon/Documents/Projects/PetGB/Project.xml",
"/C/Users/melon/Documents/Projects/PetGB/source/MenuState.hx", "/C/Users/melon/Documents/Projects/PetGB/source/MenuState.hx",
@ -612,14 +699,7 @@
"/C/Users/melon/Programs/Ice/config.txt", "/C/Users/melon/Programs/Ice/config.txt",
"/C/Users/melon/Desktop/RAVBA/vbam.ini", "/C/Users/melon/Desktop/RAVBA/vbam.ini",
"/C/Users/melon/Downloads/Turn_Off_Fast_Startup.bat", "/C/Users/melon/Downloads/Turn_Off_Fast_Startup.bat",
"/C/Users/melon/Downloads/RAVBA/vbam.ini", "/C/Users/melon/Downloads/RAVBA/vbam.ini"
"/C/Users/melon/Programs/KanColleViewer/Licenses/tmp/happypanda.log",
"/C/Users/melon/AppData/Local/Temp/7zO495B50A3/version.txt",
"/C/Users/melon/Programs/Ice/version.txt",
"/C/Users/melon/Downloads/[Fuwanovel] Grisaia no Kajitsu/Grisaia Installation Instructions.txt",
"/C/Users/melon/Downloads/TSAA/TMS Uncensored/README.txt",
"/E/Videos/AMVs/VC '16/Results.txt",
"/F/boot_config.ini"
], ],
"find": "find":
{ {
@ -634,9 +714,11 @@
}, },
"find_state": "find_state":
{ {
"case_sensitive": true, "case_sensitive": false,
"find_history": "find_history":
[ [
"body",
"train",
"stat", "stat",
"_sprGel", "_sprGel",
"Choice", "Choice",
@ -675,6 +757,7 @@
"regex": false, "regex": false,
"replace_history": "replace_history":
[ [
"Study",
"", "",
"_gelPet", "_gelPet",
"Option", "Option",
@ -700,7 +783,7 @@
"groups": "groups":
[ [
{ {
"selected": 2, "selected": 3,
"sheets": "sheets":
[ [
{ {
@ -709,15 +792,15 @@
"semi_transient": false, "semi_transient": false,
"settings": "settings":
{ {
"buffer_size": 1634, "buffer_size": 1660,
"regions": "regions":
{ {
}, },
"selection": "selection":
[ [
[ [
878, 909,
878 909
] ]
], ],
"settings": "settings":
@ -727,10 +810,10 @@
"translate_tabs_to_spaces": false "translate_tabs_to_spaces": false
}, },
"translation.x": 0.0, "translation.x": 0.0,
"translation.y": 156.0, "translation.y": 312.0,
"zoom_level": 1.0 "zoom_level": 1.0
}, },
"stack_index": 3, "stack_index": 4,
"type": "text" "type": "text"
}, },
{ {
@ -760,54 +843,24 @@
"translation.y": 0.0, "translation.y": 0.0,
"zoom_level": 1.0 "zoom_level": 1.0
}, },
"stack_index": 2, "stack_index": 3,
"type": "text" "type": "text"
}, },
{ {
"buffer": 2, "buffer": 2,
"file": "source/Gel.hx",
"semi_transient": false,
"settings":
{
"buffer_size": 1670,
"regions":
{
},
"selection":
[
[
1595,
1595
]
],
"settings":
{
"haxe-build-id": 0,
"syntax": "Packages/Haxe/Haxe.tmLanguage",
"translate_tabs_to_spaces": false
},
"translation.x": 0.0,
"translation.y": 780.0,
"zoom_level": 1.0
},
"stack_index": 0,
"type": "text"
},
{
"buffer": 3,
"file": "source/HUD.hx", "file": "source/HUD.hx",
"semi_transient": false, "semi_transient": false,
"settings": "settings":
{ {
"buffer_size": 5591, "buffer_size": 6953,
"regions": "regions":
{ {
}, },
"selection": "selection":
[ [
[ [
2861, 6094,
2861 6094
] ]
], ],
"settings": "settings":
@ -817,13 +870,80 @@
"translate_tabs_to_spaces": false "translate_tabs_to_spaces": false
}, },
"translation.x": 0.0, "translation.x": 0.0,
"translation.y": 1762.0, "translation.y": 1370.0,
"zoom_level": 1.0
},
"stack_index": 2,
"type": "text"
},
{
"buffer": 3,
"file": "source/Gel.hx",
"semi_transient": false,
"settings":
{
"buffer_size": 2471,
"regions":
{
},
"selection":
[
[
2437,
2437
]
],
"settings":
{
"haxe-build-id": 0,
"syntax": "Packages/Haxe/Haxe.tmLanguage",
"translate_tabs_to_spaces": false
},
"translation.x": 0.0,
"translation.y": 171.0,
"zoom_level": 1.0 "zoom_level": 1.0
}, },
"stack_index": 1, "stack_index": 1,
"type": "text" "type": "text"
} }
] ]
},
{
"selected": 0,
"sheets":
[
{
"buffer": 4,
"file": "GelNotes.md",
"semi_transient": false,
"settings":
{
"buffer_size": 4278,
"regions":
{
},
"selection":
[
[
296,
296
]
],
"settings":
{
"parser": "markdown",
"syntax": "Packages/Markdown/Markdown.sublime-syntax",
"target": "sublime",
"translate_tabs_to_spaces": false
},
"translation.x": 0.0,
"translation.y": 0.0,
"zoom_level": 1.0
},
"stack_index": 0,
"type": "text"
}
]
} }
], ],
"incremental_find": "incremental_find":
@ -843,11 +963,18 @@
0, 0,
1, 1,
1 1
],
[
1,
0,
2,
1
] ]
], ],
"cols": "cols":
[ [
0.0, 0.0,
0.559843885516,
1.0 1.0
], ],
"rows": "rows":
@ -865,6 +992,10 @@
{ {
"height": 0.0 "height": 0.0
}, },
"output.git-commit":
{
"height": 118.0
},
"pinned_build_system": "Packages/Python 3/Python3.sublime-build", "pinned_build_system": "Packages/Python 3/Python3.sublime-build",
"project": "PetGB.sublime-project", "project": "PetGB.sublime-project",
"replace": "replace":
@ -899,11 +1030,11 @@
], ],
"width": 0.0 "width": 0.0
}, },
"selected_group": 0, "selected_group": 1,
"settings": "settings":
{ {
}, },
"show_minimap": true, "show_minimap": false,
"show_open_files": false, "show_open_files": false,
"show_tabs": true, "show_tabs": true,
"side_bar_visible": true, "side_bar_visible": true,

View File

@ -10,7 +10,7 @@ class Gel extends FlxSprite
private var MAX_LEVEL(default, never):Int = 100; private var MAX_LEVEL(default, never):Int = 100;
// Usless Stats that have no pupose yet // Usless Stats that have no pupose yet
public var Int:Int = 1; // had to be somewhat smart to get out of the egg public var Intellect:Int = 1; // had to be somewhat smart to get out of the egg
public var Age:Int = 0; public var Age:Int = 0;
// Mood Modifiers // Mood Modifiers
@ -18,11 +18,14 @@ class Gel extends FlxSprite
public var Discipline:Int = 50; public var Discipline:Int = 50;
public var Fullness = 50; public var Fullness = 50;
public var Sleepiness = 0; public var Sleepiness = 0;
public var Waste = 0;
//private var _inEgg:Bool = true; //private var _inEgg:Bool = true;
private var _isHungry:Bool = false; private var _isHungry:Bool = false;
private var _hasEaten:Bool = false; private var _wasteReady:Bool = false;
private var _madeWaste:Bool = false; private var _madeWaste:Bool = false;
private var _isTired:Bool = false;
private var _isAsleep:Bool = false;
// Mood // Mood
private var _currentMood:Mood = NEUTRAL; private var _currentMood:Mood = NEUTRAL;
@ -35,19 +38,21 @@ class Gel extends FlxSprite
super(X, Y); super(X, Y);
loadGraphic(AssetPaths.Player__png, true, 64, 64); loadGraphic(AssetPaths.Player__png, true, 64, 64);
animation.add("blink", [1, 2, 3, 4, 5, 6, 5, 4, 3, 2], 5, true); animation.add("neutral", [1, 2, 3, 4, 5, 6, 5, 4, 3, 2], 5, true);
animation.add("happy", [1, 2, 3, 4, 5, 6, 5, 4, 3, 2], 5, true);
animation.add("angry", [1, 2, 3, 4, 5, 6, 5, 4, 3, 2], 5, true);
// DEBUG // DEBUG
FlxG.watch.add(this, "Wait"); FlxG.watch.add(this, "Wait");
FlxG.watch.add(this, "Happiness"); FlxG.watch.add(this, "Happiness");
FlxG.watch.add(this, "Discipline");
FlxG.watch.add(this, "Fullness"); FlxG.watch.add(this, "Fullness");
} }
override function update(elsapsed:Float):Void override function update(elsapsed:Float):Void
{ {
if (animation.curAnim == null) if (animation.curAnim == null)
animation.play("blink"); animation.play("neutral");
super.update(elsapsed); super.update(elsapsed);
} }
@ -72,11 +77,31 @@ class Gel extends FlxSprite
{ {
Fullness += 25; Fullness += 25;
Happiness += 10; Happiness += 10;
Discipline -=5;
} }
checkRange(); checkRange();
} }
public function Praise():Void
{
Wait = true;
Happiness += 10;
Discipline -= 10;
checkRange();
}
public function Scold():Void
{
Wait = true;
Happiness -= 10;
Discipline += 10;
}
private function checkRange():Void private function checkRange():Void
{ {
if (Fullness > MAX_LEVEL) if (Fullness > MAX_LEVEL)
@ -102,8 +127,10 @@ enum Mood
HAPPY; HAPPY;
ANGRY; ANGRY;
HUNGRY; HUNGRY;
TIRED; SLEEPY;
WASTE;
WASTING;
SLEEPING;
ENCOURAGED; ENCOURAGED;
SAD; SAD;

View File

@ -209,6 +209,7 @@ class HUD extends FlxTypedGroup<FlxSprite>
{ {
switch(option) switch(option)
{ {
// INFO
case 0: case 0:
// //
@ -216,21 +217,27 @@ class HUD extends FlxTypedGroup<FlxSprite>
case 1: case 1:
feedGel(); feedGel();
// TRAIN
case 2: case 2:
// //
// REST
case 3: case 3:
// //
// CHEER
case 4: case 4:
// praiseGel();
// SCOLD
case 5: case 5:
// scoldGel();
// WIPE
case 6: case 6:
// //
// CONFIG
case 7: case 7:
// //
} }
@ -246,6 +253,20 @@ class HUD extends FlxTypedGroup<FlxSprite>
_sprInteraction.fadeOut(2, itemLeave); _sprInteraction.fadeOut(2, itemLeave);
} }
private function praiseGel():Void
{
itemJoin("C");
_gel.Praise();
_sprInteraction.fadeOut(2, itemLeave);
}
private function scoldGel():Void
{
itemJoin("S");
_gel.Scold();
_sprInteraction.fadeOut(2, itemLeave);
}
private function itemJoin(letter:String = ""):Void private function itemJoin(letter:String = ""):Void
{ {
_sprInteraction.visible = true; _sprInteraction.visible = true;