Full ECS discussion gist: https://gist.github.com/LearnCocos2D/77f0ced228292676689f
foreach entity in allEntities do
foreach component in entity.components do
component.update()
end
end
// NOTE DONT put in an editor folder | |
using UnityEngine; | |
public class StatsBarAttribute : PropertyAttribute | |
{ | |
public string valueMax; | |
public StatsBarColor color; | |
public StatsBarAttribute(string valueMax = null, StatsBarColor color = StatsBarColor.Red) |
// 2 sided standard surface shader (using 2 passes), with fixed normals for flipped faces | |
Shader "Custom/TwoSided (FixedNormals)" | |
{ | |
Properties | |
{ | |
_Color ("Color", Color) = (1,1,1,1) | |
_MainTex ("Albedo (RGB)", 2D) = "white" {} | |
_Glossiness ("Smoothness", Range(0,1)) = 0.5 | |
_Metallic ("Metallic", Range(0,1)) = 0.0 |
// NOTE DONT put in an editor folder | |
using UnityEngine; | |
public class ReadOnlyAttribute : PropertyAttribute { } |
So, the way this goes is I post my AVR code, then I post what the HTC Vive does. | |
The output is: POST 0: (# of bytes) (IMU Timecode MSBs) (All raw light data) | |
(All raw light data ends with [3 bytes, LSB timecode] [OTA CRC (probably ignore)]) | |
Events (TIME): (LED CODE 1)/(TIME CODE 1/TIMECODE 2)/(LED CODE 2)/(TIME CODE 3/TIMECODE 4)... | |
//NOTICE: The funky encoding of the numbers, and the fact that paramters are read from the end of the data going forward. | |
//We know we're done when the # of parameters read is (# of bytes left*2)-1 |
using UnityEngine; | |
using UnityEditor; | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class ColorToCSharp : EditorWindow | |
{ | |
[SerializeField] | |
private bool _usedColorPickerOnce = false; |
Shader "Custom/OnlyShadowsAndAtten" | |
{ | |
SubShader | |
{ | |
Tags { "RenderType"="Opaque" } | |
LOD 200 | |
// Forward rendering base (main directional light) pass. | |
Pass | |
{ |
Shader "StandardDoubleSide" | |
{ | |
Properties | |
{ | |
_Color("Color", Color) = (1,1,1,1) | |
_MainTex("Albedo", 2D) = "white" {} | |
_Cutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5 | |
_Glossiness("Smoothness", Range(0.0, 1.0)) = 0.5 |
Full ECS discussion gist: https://gist.github.com/LearnCocos2D/77f0ced228292676689f
foreach entity in allEntities do
foreach component in entity.components do
component.update()
end
end
<!-- | |
Created by Kuitos on 2015/03/06 10:15 AM. | |
Email: [email protected] | |
author: EdwardCTaylor | |
author: Kuitos | |
Licence: MIT | |
--> | |
<!DOCTYPE html> | |
<html> | |
<head> |
<?php | |
/** | |
* Simple IP filter | |
* | |
* Use this middleware with your Slim Framework application | |
* to require restrict access to certain ip addresses | |
* | |
* USAGE | |
* | |
* $app = new \Slim\Slim(); |