Skip to content

Instantly share code, notes, and snippets.

View gruebite's full-sized avatar
🎯
Focusing

gruebite gruebite

🎯
Focusing
View GitHub Profile
@gruebite
gruebite / example.gd
Last active August 29, 2025 18:43
Godot scene instantiation from class_name
extends Node
func _ready() -> void:
# MyScene is a `class_name` in a `.gd` script with an associated `.tscn` file
var scene = Instantiate.scene(MyScene)
add_child(scene)
@gruebite
gruebite / main.zig
Last active April 26, 2021 22:04
Zig dynamic dispatch with @fieldParentPtr
const print = @import("std").debug.print;
const Animal = struct {
const Self = @This();
speakFn: fn(*const Animal) void,
pub fn speak(self: *const Self) void {
self.speakFn(self);