Skip to content

Instantly share code, notes, and snippets.

View smkplus's full-sized avatar
😍
Curios

Seyed Morteza Kamali smkplus

😍
Curios
View GitHub Profile
@Hamcha
Hamcha / SmoothFollow.cs
Created July 28, 2013 00:45
Stupid Unity scripts : "Smooth Follow" from Standard Assets
// Smooth Follow from Standard Assets
// Converted to C# because I fucking hate UnityScript and it's inexistant C# interoperability
// If you have C# code and you want to edit SmoothFollow's vars ingame, use this instead.
using UnityEngine;
using System.Collections;
public class SmoothFollow : MonoBehaviour {
// The target we are following
public Transform target;
@sugi-cho
sugi-cho / ImageEffectBase.shader
Last active December 12, 2017 08:47
use vertex shader in surface shader
Shader "Custom/ImageEffectBase" {
Properties {
_MainTex ("Base (RGB)", 2D) = "white" {}
}
CGINCLUDE
#include "UnityCG.cginc"
sampler2D _MainTex;
half4 _MainTex_TexelSize;
@jimfleming
jimfleming / UnityDiffuseLightmap.shader
Last active June 21, 2023 00:44
Example depicting applying Unity lightmapping data to a simple diffuse shader.
Shader "Diffuse Lightmap" {
Properties {
_MainTex ("Texture 1", 2D) = "white" {}
}
SubShader {
Tags { "RenderType" = "Opaque" }
Pass {
@aturgarg
aturgarg / DesignPatterns.md
Created July 27, 2012 08:16
Design patterns ( Simplified description)

There are 3 major categories of design patterns

  1. Creational Pattern - designed to solve problems related to the creational process of objects and classes.
  2. Structural pattern - designed to solve problems related to the composition of an object or class.
  3. Behavioral pattern - designed to solve problems related to the behaviour and interaction between objects or classes.

Primary Creational patterns are:


1. Abstract Factory - provides a method for creating objects or classes that are related or dependent, without specifying the concrete class.
Example -