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 "ArxOrthoShadows" { | |
Properties { | |
_Color ("Main Color", Color) = (1,1,1,1) | |
_MainTex ("Base (RGB) Gloss (A)", 2D) = "white" {} | |
_BumpMap ("Normalmap", 2D) = "bump" {} | |
_Detail ("Detail (RGB)", 2D) = "gray" {} | |
} | |
SubShader { | |
Tags { "RenderType"="Opaque" } | |
LOD 400 |
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
// Regular dispatch table | |
Dictionary<string, Action> dispatch = new Dictionary<string, Action>(); | |
dispatch["help"] = new Action(() => Console.WriteLine("Hello :3")); | |
dispatch["dosomething"] = new Action(() => | |
{ | |
Console.WriteLine("Do Something else"); | |
}); | |
dispatch["help"](); |
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; | |
public static class RendererExtensions | |
{ | |
public static bool IsVisibleFrom( this Renderer renderer, Camera camera ) | |
{ | |
Plane[] planes = GeometryUtility.CalculateFrustumPlanes( camera ); | |
return GeometryUtility.TestPlanesAABB( planes, renderer.bounds ); | |
} | |
} |
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 System; | |
using System.Diagnostics; | |
using Box2DX.Collision; | |
using Box2DX.Common; | |
using Box2DX.Dynamics; | |
using SFML.Graphics; | |
using SFML.Window; | |
using Color = SFML.Graphics.Color; | |
namespace TestingSFML |
NewerOlder