This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This script is created with help of tutorial by Catlikecoding | |
// meant to create infinte platformer game | |
// http://catlikecoding.com/unity/tutorials/runner/ | |
using UnityEngine; | |
using System.Collections.Generic; | |
public class PlatformManager : MonoBehaviour { | |
public Transform prefab; | |
public int numberOfObjects; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "MyShader" | |
{ | |
Properties | |
{ | |
// The properties of your shaders | |
// - textures | |
// - colours | |
// - parameters | |
// ... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Properties { | |
// properties for water shader | |
_WaveScale ("Wave scale", Range (0.02,0.15)) = 0.07 // sliders | |
_ReflDistort ("Reflection distort", Range (0,1.5)) = 0.5 | |
_RefrDistort ("Refraction distort", Range (0,1.5)) = 0.4 | |
_RefrColor ("Refraction color", Color) = (.34, .85, .92, 1) // color | |
_ReflectionTex ("Environment Reflection", 2D) = "" {} // textures | |
_RefractionTex ("Environment Refraction", 2D) = "" {} | |
_Fresnel ("Fresnel (A) ", 2D) = "" {} | |
_BumpMap ("Bumpmap (RGB) ", 2D) = "" {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Unlit/CustomShader" | |
{ | |
Properties { | |
_Color("Main Color", Color) = (1,1,1,1) | |
} | |
SubShader { | |
PASS { | |
CGPROGRAM | |
#pragma vertex vert |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class InputHandler : MonoBehaviour { | |
private bool isDragging; | |
private GameObject target; | |
float touchDuration; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Unlit/CustomShader_Texture" | |
{ | |
Properties { | |
// Texture field in inspector where we assign texture to the model | |
_MainTexture("Main Texture",2D) = "white"{} | |
} | |
SubShader { | |
PASS { | |
CGPROGRAM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class Levitate : MonoBehaviour { | |
public float amplitude = 0.1f; | |
public Vector3 speed; | |
private Vector3 tempVal; | |
private Vector3 tempPos; | |
void Start () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class SwipeScript : MonoBehaviour { | |
private float fingerStartTime = 0.0f; | |
private Vector2 fingerStartPos = Vector2.zero; | |
private bool isSwipe = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) 2012 Calvin Rien | |
// http://the.darktable.com | |
// | |
// This software is provided 'as-is', without any express or implied warranty. In | |
// no event will the authors be held liable for any damages arising from the use | |
// of this software. | |
// | |
// Permission is granted to anyone to use this software for any purpose, | |
// including commercial applications, and to alter it and redistribute it freely, | |
// subject to the following restrictions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "FX/Matte Shadow" { | |
Properties { | |
_Color ("Main Color", Color) = (1,1,1,1) | |
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {} | |
_Cutoff ("Alpha cutoff", Range(0,1)) = 0.5 | |
} | |
SubShader { | |
Tags {"Queue"="AlphaTest" "IgnoreProjector"="True" "RenderType"="TransparentCutout"} | |
LOD 200 | |
Blend Zero SrcColor |