Simple scene manager with simple transition effects using RPG Maker greyscale images. Doesn't do async loading at all, but that's fine for small games that just want a little pizzaz to their visuals. Just drop the file into your project and add it to your Autoloads. Then start doing SceneManager.change_scene('res://myscene.tscn')
instead of get_tree().change_scene('res://myscene.tscn')
and you'll be good to go.
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
Simple function created so you can make reducers that are classes in ES6. | |
I did this because I found the switch-statement approach to be rather messy | |
once the action handling within the reducer gets substantially large. |
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
using System; | |
using System.Collections.Generic; | |
/// <summary> | |
/// Very simple entity-component system | |
/// Provides just the basics, doesn't need to be very efficient because it's | |
/// most valuable for smaller games without a shit ton of entities | |
/// </summary> | |
namespace github.io.nhydock.ECS | |
{ |
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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.Tilemaps; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
#endif | |
namespace Adventure.Tilemaps |
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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.UI; | |
using UnityEngine.EventSystems; | |
public class RedirectInput : StandaloneInputModule { | |
// letterboxed fixed area | |
[SerializeField] Vector2 fixedResolution; |
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
from sanic import Sanic | |
from consul.aio import Consul | |
import default_settings | |
import asyncio | |
""" | |
Initialize application | |
""" |
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 | |
var next_scene = null | |
var is_ready setget _finish_transition | |
onready var anim = $Fader/AnimationPlayer | |
func _finish_transition(value): | |
if value: | |
is_ready = 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
shader_type canvas_item; | |
render_mode blend_mix; | |
uniform float transition: hint_range(0, 1); | |
float val(vec3 color) { | |
return max(max(color.r, color.g), color.b); | |
} | |
void fragment() { |
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 | |
onready var anim = $Fader/AnimationPlayer | |
func change_scene(next_scene, params=[]): | |
""" | |
Changes scene with a transition. | |
You can hold the fade back in transition if desired until | |
the next scene is in a state that is considered 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
extends "res://maps/NPC.gd" | |
func interact(): | |
dialog.prepare() | |
dialog.show() | |
if GameState.Flags.get('talked_to_guilford'): | |
dialog.line( | |
""" | |
#Guilford | |
Don't worry, I'll have your equipment ready for ya soon. Lemme just finish this drink. |