Skip to content

Instantly share code, notes, and snippets.

View smbss1's full-sized avatar
🏠
Working from home

Softands smbss1

🏠
Working from home
View GitHub Profile
@smbss1
smbss1 / MathParabola.cs
Created July 3, 2022 23:29 — forked from ditzel/MathParabola.cs
A simple Math class to calculate a point in 2D or 3D space lying on a parabola. And a more complex parabola controller that you can put on an object.
using UnityEngine;
using System;
public class MathParabola
{
public static Vector3 Parabola(Vector3 start, Vector3 end, float height, float t)
{
Func<float, float> f = x => -4 * height * x * x + 4 * height * x;
@smbss1
smbss1 / SerializedPropertyExtensions.cs
Created May 30, 2020 01:05 — forked from douduck08/README.md
Use Reflection to get instance of Unity's SerializedProperty in Custom Editor.
// <author>
// douduck08: https://github.com/douduck08
// Use Reflection to get instance of Unity's SerializedProperty in Custom Editor.
// Modified codes from 'Unity Answers', in order to apply on nested List<T> or Array.
//
// Original author: HiddenMonk & Johannes Deml
// Ref: http://answers.unity3d.com/questions/627090/convert-serializedproperty-to-custom-class.html
// </author>
using System.Collections;
@smbss1
smbss1 / Reference.cs
Created May 29, 2020 20:32 — forked from Lazersquid/Reference.cs
Unity generic scriptable object variable reference pattern
using System;
/// <summary>
/// Reference Class.
/// </summary>
[Serializable]
public abstract class Reference
{
}
@smbss1
smbss1 / dictionary.c
Created January 8, 2020 13:08 — forked from rosshays/dictionary.c
C Dictionary (map) Implementation
#include "dictionary.h"
#include <stdlib.h>
#include <stdbool.h>
////////////////////////////////////////////////////////////////////////////////
// static function forward declarations
// dictionary node static
static DictionaryNode *DictionaryNodeAlloc(void);