Initial commit
This commit is contained in:
BIN
objects/QuestionGUI/.Draw_64.gml.swp
Normal file
BIN
objects/QuestionGUI/.Draw_64.gml.swp
Normal file
Binary file not shown.
12
objects/QuestionGUI/Create_0.gml
Normal file
12
objects/QuestionGUI/Create_0.gml
Normal file
@@ -0,0 +1,12 @@
|
||||
http("http://localhost:10000","GET","",{},function(status,result){
|
||||
var question = json_parse(result);
|
||||
global.questionmap[? "category"] = question.category;
|
||||
global.questionmap[? "question"] = question.question;
|
||||
global.questionmap[? 1] = question.answer1;
|
||||
global.questionmap[? 2] = question.answer2;
|
||||
global.questionmap[? 3] = question.answer3;
|
||||
global.questionmap[? 4] = question.answer4;
|
||||
});
|
||||
|
||||
|
||||
|
||||
19
objects/QuestionGUI/Draw_64.gml
Normal file
19
objects/QuestionGUI/Draw_64.gml
Normal file
@@ -0,0 +1,19 @@
|
||||
if (ds_map_exists(global.questionmap, "category")) {
|
||||
panelpositionx = window_get_width() / 2;
|
||||
panelpositiony = window_get_height() / 2;
|
||||
draw_sprite(questionpanel_final, 0, panelpositionx, panelpositiony);
|
||||
draw_set_font(QuestionCategoryFont);
|
||||
draw_set_colour($FF000000 & $ffffff);
|
||||
var l51DA06A0_0=($FF000000 >> 24);
|
||||
draw_set_alpha(l51DA06A0_0 / $ff);
|
||||
draw_text(120, 140, global.questionmap[? "category"] + "");
|
||||
draw_set_font(QuestionTextyFont);
|
||||
draw_set_colour($FF000000 & $ffffff);
|
||||
var l37C42516_0=($FF000000 >> 24);
|
||||
draw_set_alpha(l37C42516_0 / $ff);
|
||||
draw_text(120, 200, global.questionmap[? "question"] + "");
|
||||
draw_text(120, 480, "1. " + global.questionmap[? 1] + "");
|
||||
draw_text(120, 570, "2. " + global.questionmap[? 2] + "");
|
||||
draw_text(710, 480, "3. " + global.questionmap[? 3] + "");
|
||||
draw_text(710, 570, "4. " + global.questionmap[? 4] + "");
|
||||
}
|
||||
13
objects/QuestionGUI/KeyPress_1.gml
Normal file
13
objects/QuestionGUI/KeyPress_1.gml
Normal file
@@ -0,0 +1,13 @@
|
||||
if keyboard_check(ord("1"))
|
||||
{
|
||||
switch (keyboard_key)
|
||||
{
|
||||
case ord("1"):
|
||||
case ord("2"):
|
||||
case ord("3"):
|
||||
case ord("4"):
|
||||
instance_destroy()
|
||||
instance_create_layer(0,0,"Instances", QuestionGUI)
|
||||
break;
|
||||
}
|
||||
}
|
||||
39
objects/QuestionGUI/QuestionGUI.yy
Normal file
39
objects/QuestionGUI/QuestionGUI.yy
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"spriteId": null,
|
||||
"solid": false,
|
||||
"visible": true,
|
||||
"spriteMaskId": null,
|
||||
"persistent": false,
|
||||
"parentObjectId": null,
|
||||
"physicsObject": false,
|
||||
"physicsSensor": false,
|
||||
"physicsShape": 1,
|
||||
"physicsGroup": 1,
|
||||
"physicsDensity": 0.5,
|
||||
"physicsRestitution": 0.1,
|
||||
"physicsLinearDamping": 0.1,
|
||||
"physicsAngularDamping": 0.1,
|
||||
"physicsFriction": 0.2,
|
||||
"physicsStartAwake": true,
|
||||
"physicsKinematic": false,
|
||||
"physicsShapePoints": [],
|
||||
"eventList": [
|
||||
{"isDnD":false,"eventNum":64,"eventType":8,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
|
||||
{"isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
|
||||
{"isDnD":false,"eventNum":1,"eventType":9,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
|
||||
],
|
||||
"properties": [
|
||||
{"varType":1,"value":"1","rangeEnabled":false,"rangeMin":0.0,"rangeMax":10.0,"listItems":[],"multiselect":false,"filters":[],"resourceVersion":"1.0","name":"panelpositionx","tags":[],"resourceType":"GMObjectProperty",},
|
||||
{"varType":1,"value":"2","rangeEnabled":false,"rangeMin":0.0,"rangeMax":10.0,"listItems":[],"multiselect":false,"filters":[],"resourceVersion":"1.0","name":"panelpositiony","tags":[],"resourceType":"GMObjectProperty",},
|
||||
{"varType":1,"value":"0","rangeEnabled":false,"rangeMin":0.0,"rangeMax":10.0,"listItems":[],"multiselect":false,"filters":[],"resourceVersion":"1.0","name":"question","tags":[],"resourceType":"GMObjectProperty",},
|
||||
],
|
||||
"overriddenProperties": [],
|
||||
"parent": {
|
||||
"name": "Objects",
|
||||
"path": "folders/Objects.yy",
|
||||
},
|
||||
"resourceVersion": "1.0",
|
||||
"name": "QuestionGUI",
|
||||
"tags": [],
|
||||
"resourceType": "GMObject",
|
||||
}
|
||||
1
objects/Start/Create_0.gml
Normal file
1
objects/Start/Create_0.gml
Normal file
@@ -0,0 +1 @@
|
||||
global.questionmap = ds_map_create();
|
||||
6
objects/Start/Mouse_7.gml
Normal file
6
objects/Start/Mouse_7.gml
Normal file
@@ -0,0 +1,6 @@
|
||||
/// @DnDAction : YoYo Games.Rooms.Go_To_Room
|
||||
/// @DnDVersion : 1
|
||||
/// @DnDHash : 2A0702A3
|
||||
/// @DnDArgument : "room" "FightRoom"
|
||||
/// @DnDSaveInfo : "room" "FightRoom"
|
||||
room_goto(FightRoom);
|
||||
1
objects/Start/Mouse_7.gml.dnd
Normal file
1
objects/Start/Mouse_7.gml.dnd
Normal file
@@ -0,0 +1 @@
|
||||
<Layouts><Layout layout_name="DnDWorkspace" layout_guid="239743fc-610b-4aad-b5d1-7ecdf2fac7ac" toolbox_size="25%" toolbox_anchor="Last" story_size="225px"><Workspace zoom="1" pan="[-63, -97.48001]" /><Node hash="2A0702A3" left="78" top="112.3333" width="250" height="63" /></Layout></Layouts>
|
||||
37
objects/Start/Start.yy
Normal file
37
objects/Start/Start.yy
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"spriteId": {
|
||||
"name": "startbutton",
|
||||
"path": "sprites/startbutton/startbutton.yy",
|
||||
},
|
||||
"solid": false,
|
||||
"visible": true,
|
||||
"spriteMaskId": null,
|
||||
"persistent": false,
|
||||
"parentObjectId": null,
|
||||
"physicsObject": false,
|
||||
"physicsSensor": false,
|
||||
"physicsShape": 1,
|
||||
"physicsGroup": 1,
|
||||
"physicsDensity": 0.5,
|
||||
"physicsRestitution": 0.1,
|
||||
"physicsLinearDamping": 0.1,
|
||||
"physicsAngularDamping": 0.1,
|
||||
"physicsFriction": 0.2,
|
||||
"physicsStartAwake": true,
|
||||
"physicsKinematic": false,
|
||||
"physicsShapePoints": [],
|
||||
"eventList": [
|
||||
{"isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
|
||||
{"isDnD":true,"eventNum":7,"eventType":6,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
|
||||
],
|
||||
"properties": [],
|
||||
"overriddenProperties": [],
|
||||
"parent": {
|
||||
"name": "Objects",
|
||||
"path": "folders/Objects.yy",
|
||||
},
|
||||
"resourceVersion": "1.0",
|
||||
"name": "Start",
|
||||
"tags": [],
|
||||
"resourceType": "GMObject",
|
||||
}
|
||||
8
objects/obj_http/Create_0.gml
Normal file
8
objects/obj_http/Create_0.gml
Normal file
@@ -0,0 +1,8 @@
|
||||
/// @description
|
||||
//gml_pragma("global","instance_create_depth(0,0,0,obj_http);");
|
||||
|
||||
if (instance_number(object_index) > 1) {
|
||||
instance_destroy(); // THERE CAN ONLY BE ONE
|
||||
}
|
||||
|
||||
requests = ds_map_create();
|
||||
50
objects/obj_http/Other_62.gml
Normal file
50
objects/obj_http/Other_62.gml
Normal file
@@ -0,0 +1,50 @@
|
||||
/// @description
|
||||
var req = async_load[? "id"]
|
||||
if (requests[? req] == undefined) return;
|
||||
|
||||
var status = async_load[? "status"];
|
||||
var options = requests[? req].options;
|
||||
if (status < 0) {
|
||||
// Error
|
||||
|
||||
var error = requests[? req].error;
|
||||
if (error != undefined) {
|
||||
var result = async_load[? "result"];
|
||||
if (options.get_file) {
|
||||
result = options.buffer;
|
||||
}
|
||||
if (async_load[? "response_headers"]) {
|
||||
options.response_headers = async_load[? "response_headers"];
|
||||
}
|
||||
error(async_load[? "http_status"],result,requests[? req].options);
|
||||
if (requests[? req].options.keep_buffer == false) {
|
||||
buffer_delete(requests[? req].options.buffer);
|
||||
}
|
||||
requests[? req] = undefined;
|
||||
}
|
||||
}
|
||||
if (status == 0) {
|
||||
// Complete
|
||||
var callback = requests[? req].callback;
|
||||
if (callback != undefined) {
|
||||
var result = async_load[? "result"];
|
||||
if (options.get_file) {
|
||||
result = options.buffer;
|
||||
}
|
||||
if (async_load[? "response_headers"]) {
|
||||
options.response_headers = async_load[? "response_headers"];
|
||||
}
|
||||
callback(async_load[? "http_status"],result,requests[? req].options);
|
||||
if (requests[? req].options.keep_buffer == false && requests[? req].options.buffer) {
|
||||
buffer_delete(requests[? req].options.buffer);
|
||||
}
|
||||
requests[? req] = undefined;
|
||||
}
|
||||
}
|
||||
if (status == 1) {
|
||||
// Progress
|
||||
var progress = requests[? req].progress;
|
||||
if (progress == undefined) {
|
||||
progress(async_load[? "contentLength"],async_load[? "sizeDownloaded"],requests[? req].options);
|
||||
}
|
||||
}
|
||||
34
objects/obj_http/obj_http.yy
Normal file
34
objects/obj_http/obj_http.yy
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"spriteId": null,
|
||||
"solid": false,
|
||||
"visible": true,
|
||||
"spriteMaskId": null,
|
||||
"persistent": true,
|
||||
"parentObjectId": null,
|
||||
"physicsObject": false,
|
||||
"physicsSensor": false,
|
||||
"physicsShape": 1,
|
||||
"physicsGroup": 1,
|
||||
"physicsDensity": 0.5,
|
||||
"physicsRestitution": 0.1,
|
||||
"physicsLinearDamping": 0.1,
|
||||
"physicsAngularDamping": 0.1,
|
||||
"physicsFriction": 0.2,
|
||||
"physicsStartAwake": true,
|
||||
"physicsKinematic": false,
|
||||
"physicsShapePoints": [],
|
||||
"eventList": [
|
||||
{"isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
|
||||
{"isDnD":false,"eventNum":62,"eventType":7,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
|
||||
],
|
||||
"properties": [],
|
||||
"overriddenProperties": [],
|
||||
"parent": {
|
||||
"name": "Objects",
|
||||
"path": "folders/Objects.yy",
|
||||
},
|
||||
"resourceVersion": "1.0",
|
||||
"name": "obj_http",
|
||||
"tags": [],
|
||||
"resourceType": "GMObject",
|
||||
}
|
||||
Reference in New Issue
Block a user