This file contains 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
# godot_finite_state_machine.gd | |
# by: @november_dev | |
# | |
# The finite state machine takes in a number of states and transitions. | |
# | |
# A state can contain a function that will be executed or looped while the state is active. | |
# | |
# The transition gets a function that returns a boolean truthiness value, which determines | |
# if the transition should happen or not. | |
# |
This file contains 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
# godot_command_line.gd | |
# by: @november_dev | |
# | |
# Parse command line arguments in an exported project | |
# | |
# Command: | |
# /path/to/executable "res://scene.tscn" first_value=value second_value=value | |
# | |
# Sample: | |
# |
This file contains 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
# | |
# Author: @November_Dev | |
# | |
# This class is a straightforward, zero overhead implementation of | |
# very basic FPS controls. | |
# | |
# Ideal node setup: | |
# KinematicBody | |
# |- Camera | |
# |
This file contains 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 API = "http://localhost:5000/api" | |
var current_request = {} | |
var request_queue = [] | |
var is_busy = false | |
var http | |
func _ready(): | |
http = HTTPRequest.new() |
This file contains 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.Linq; | |
using System.Collections.Generic; | |
public enum BehaviourTreeState | |
{ | |
Success, | |
Failure, | |
Running | |
} |
This file contains 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
/* | |
Adds curvature to any mesh. | |
Author: @November_Dev | |
*/ | |
shader_type spatial; |
This file contains 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
# Loads a scene in the background using a seperate thread and a queue. | |
# Foreach new scene there will be an instance of ResourceInteractiveLoader | |
# that will raise an on_scene_loaded event once the scene has been loaded. | |
# Hooking the on_progress event will give you the current progress of any | |
# scene that is being processed in realtime. The loader also uses caching | |
# to avoid duplicate loading of scenes and it will prevent loading the | |
# same scene multiple times concurrently. | |
# | |
# Sample usage: | |
# |
This file contains 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
public static bool IsEven(int i) { | |
return (i & 1) == 0; | |
} | |
/* | |
Returns if the given integer is even using Bitwise & AND operator: | |
1010 equals 10 in decimal | |
0001 equals 1 in decimal | |
0000 AND returns 0 so it is even (0 of 10, 1 of 1) |
This file contains 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 KinematicBody2D | |
const HALT_SPEED = 0.325 | |
const MAX_SPEED = 750.0 | |
const GRAVITY = 1200.0 | |
const MAX_JUMP = 725.0 | |
const MAX_JUMP_TIME = 1.5 | |
const MAX_JUMP_FORGIVENESS_TIME = 0.5 |
This file contains 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; | |
// Author: NovemberDev | |
public class Program | |
{ | |
/// | |
/// TreeNode baseclass | |
/// |
OlderNewer