Skip to content

Instantly share code, notes, and snippets.

View omeganoob's full-sized avatar
🐧
Chilling

omeganoob

🐧
Chilling
View GitHub Profile
@adammyhre
adammyhre / AnyValue.cs
Created January 19, 2025 08:11
Serialized Callback System
using System;
using UnityEngine;
public enum ValueType { Int, Float, Bool, String, Vector3 }
[Serializable]
public struct AnyValue {
public ValueType type;
// Storage for different types of values
@yasirkula
yasirkula / SnapRectTransformAnchorsToCorners.cs
Created May 28, 2024 18:20
Snap a RectTransform's anchors to its corner points in Unity
using UnityEditor;
using UnityEngine;
public class SnapRectTransformAnchorsToCorners : MonoBehaviour
{
[MenuItem("CONTEXT/RectTransform/Snap Anchors To Corners", priority = 50)]
private static void Execute(MenuCommand command)
{
RectTransform rectTransform = command.context as RectTransform;
RectTransform parent = rectTransform.parent as RectTransform;
@Matthew-J-Spencer
Matthew-J-Spencer / PlayerAnimator.cs
Created July 6, 2022 11:30
Control unity animations using code. Video: https://youtu.be/ZwLekxsSY3Y
using System;
using UnityEngine;
using UnityEngine.Tilemaps;
using Random = UnityEngine.Random;
public class PlayerAnimator : MonoBehaviour {
[SerializeField] private float _minImpactForce = 20;
// Anim times can be gathered from the state itself, but
// for the simplicity of the video...
@bradtraversy
bradtraversy / mysql_cheat_sheet.md
Last active April 26, 2025 21:23
MySQL Cheat Sheet

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@kirbysayshi
kirbysayshi / lib_game_entities.js
Created July 29, 2013 04:25
rotatablegame.js: Rotate the camera in an impactjs game! Underscores in filenames indicate directories.
ig.module(
'game.entities.square'
)
.requires(
'impact.entity'
)
.defines(function(){
EntitySquare = ig.Entity.extend({
@jessefreeman
jessefreeman / camera.js
Created March 1, 2013 20:27
A simple camera for ImpactJS. Also allows for a mask overlay for simple lighting effects.
ig.module(
'game.plugins.camera'
)
.requires(
'impact.game',
'impact.image'
)
.defines(function () {
@FusionPizza
FusionPizza / Impact3D.js
Created October 29, 2012 14:20 — forked from chribbe/Impact3D.js
Helper to handle three.js objects to render an impactJS game
impact3D = {};
impact3D.models = impact3D.models || {};
impact3D.entities = impact3D.entities || {};
impact3D.player = impact3D.player || {};
impact3D.scene = null;
impact3D.updateCount = 0;
impact3D.init = function(scene)
{
console.log(" ***impact3D Init *** ");