Skip to content

Instantly share code, notes, and snippets.

View Wikzo's full-sized avatar

Gustav Wikzo

View GitHub Profile
@Wikzo
Wikzo / DummyData..cs
Created October 7, 2016 08:35
Unity JsonUtility Serializer bug with Quaternions (formatting?)
using System;
using UnityEngine;
using System.Collections;
using System.IO;
[Serializable]
public class DummyData : ISaveData
{
[SerializeField] private Vector3 _position = new Vector3();
// via http://williamchyr.com/2013/11/unity-shaders-depth-and-normal-textures/
Shader "Custom/DepthGrayscale" {
SubShader{
Tags{ "RenderType" = "Opaque" }
Pass{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
using System;
using UnityEngine;
public class TurretBarrel : MonoBehaviour
{
public GameObject Projectile;
int h;
public float AttackRange = 25f; // Distance
public float AttackDelay = 1f; // Time
using System;
using UnityEngine;
public class TurretBarrel : MonoBehaviour
{
public GameObject Projectile;
public float AttackRange = 25f; // Distance
public float AttackDelay = 1f; // Time
public bool IsAlive { get; set; }
@Wikzo
Wikzo / Form1.cs
Created September 12, 2012 23:31
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;