Skip to content

Instantly share code, notes, and snippets.

View NEO97online's full-sized avatar
🌐
Y3K

NEO97 NEO97online

🌐
Y3K
View GitHub Profile
@NEO97online
NEO97online / fsm.rs
Created July 19, 2022 00:55
Bevy FSM
use bevy::core::FixedTimestep;
use bevy::prelude::*;
#[derive(PartialEq, Clone, Copy)]
enum Phase {
Enter,
Process,
Exit,
}
pub trait UiCommand: std::fmt::Debug + 'static {
fn write(&self, commands: &mut Commands);
}
#[derive(Default, Debug)]
pub struct UiNode {
queue: Vec<Box<dyn UiCommand>>,
children: UiTree,
}

Keybase proof

I hereby claim:

  • I am auderer on github.
  • I am auderer (https://keybase.io/auderer) on keybase.
  • I have a public key ASDFTjHelsAfhfwtf7y23y7VE3pyjnBAEjYIPfv0rpfaOQo

To claim this, I am signing this object:

@NEO97online
NEO97online / terminal.gd
Created January 25, 2021 05:34
GDScript Terminal
class_name Terminal
extends Control
export var font: DynamicFont
const BLACK = "§0"
const WHITE = "§1"
const RED = "§2"
const ORANGE = "§3"
const YELLOW = "§4"
@NEO97online
NEO97online / PlayerLegFSM.gd
Created December 29, 2020 06:45
PlayerLegFSM
extends StateMachine
enum LegState {
IDLE, RUN, SNEAK, JUMP, FALL, DASH, SLIDE, WALLRUN, WALLJUMP
}
var dash_frames = 0
var dash_direction = Vector3.ZERO
var slide_direction = Vector3.ZERO
@NEO97online
NEO97online / init.vim
Last active May 21, 2020 20:05
nice coc
" Configuration for coc.nvim
hi Pmenu ctermbg=237 guibg=#448aff
set signcolumn=yes
set cmdheight=2
set updatetime=300
set shortmess+=c
let g:coc_global_extensions = [
\ 'coc-snippets',
\ 'coc-pairs',
\ 'coc-tsserver',
@NEO97online
NEO97online / create-actions.js
Created July 8, 2019 01:20
Simplified action type creator with constant validation
import camelCase from 'lodash/camelCase'
export default function createActions(actionTypes, actionTypeConstants) {
const actions = {}
for (const actionType of actionTypes) {
if (actionTypeConstants && !actionTypeConstants[actionType]) {
throw new Error(`Tried creating invalid action type: ${actionType}`)
}
const key = camelCase(actionType)
actions[key] = (payload) => ({
@NEO97online
NEO97online / firebase.module.ts
Last active March 11, 2022 05:57
Angular Firebase Module boilerplate for AngularFire2 (using Firestore and Storage) NgModule
import { NgModule } from '@angular/core';
import { AngularFireModule } from 'angularfire2';
import { AngularFirestoreModule } from 'angularfire2/firestore';
import { AngularFireAuthModule } from 'angularfire2/auth';
import { AngularFireStorageModule } from 'angularfire2/storage';
import { environment } from '../../environments/environment';
import { FirestoreService } from './firestore.service';
import { StorageService } from './storage.service';
@NEO97online
NEO97online / .hyper.js
Last active January 9, 2018 06:35
My config file for Hyper terminal (https://hyper.is/)
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// Choose either "stable" for receiving highly polished,
// or "canary" for less polished but more frequent updates
updateChannel: 'stable',