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 Creator : MonoBehaviour { | |
// Use this for initialization | |
void Start () { | |
for (int h = 0; h < 10; h++) | |
{ | |
float he = (float)h*0.1f; |
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; | |
/* | |
* Based on http://www.blenderfreak.com/blog/post/flythrough-camera-smooth-movement-unity3d/ | |
* | |
* Controls: | |
* WASD + R/F for Up/Down | |
* Mouse wheel control movement speed | |
* Mouse pointer is used for joystick like control of orientation |
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
var fornavn = "Hans"; | |
var efternavn = "Jensen"; | |
var navn = fornavn + " " + efternavn; // "Hans Jensen" | |
var tom_streng = ""; | |
var historie = "Der gik en hest"; | |
var laengde = historie.length; // antal bogstaver i historien | |
var fundet = historie.indexOf("var"); | |
var e = historie.charAt(1); // "e" |
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
// Simple fps controller for unity | |
// To use, build this: | |
// | |
// Capsule | |
// Camera | |
// | |
// Put this script AND a CharacterController on the Capsule | |
// Link up camera to the "player_cam" property of this script | |
// Make sure Camera is positioned at (locally) 0, 0, 0 and with no rotation and scale |
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
// somewhere in your charactercontroller | |
public bool m_UseFeetIK = true; | |
public float m_FeetIkOffset = 0.0f; | |
void OnAnimatorIK() | |
{ | |
if (m_Animator) | |
{ | |
if (m_IsGrounded && m_UseFeetIK) |
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.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
interface IBitStreamWriter | |
{ | |
void SeekZero(); |
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
function setup() { | |
createCanvas(400, 400); | |
} | |
var pilop = 38; | |
var pilned = 40; | |
var pilhøjre = 39; | |
var pilvenstre = 37; | |
var x = 2; | |
var y = 2; |
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
var blob = []; | |
function setup() | |
{ | |
createCanvas(800, 400); | |
background(128); | |
fill(100,12,12); | |
noStroke(); } | |
function draw() { if(mouseIsPressed) |
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
function setup() | |
{ | |
createCanvas(700, 400); | |
background(255); | |
} | |
var deg60 = Math.PI/3; | |
function addVector(x,y,angle,length) | |
{ |
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
function setup() | |
{ | |
createCanvas(700, 500); | |
background(220); | |
strokeWeight(10); | |
} | |
function transform(shape, angle, factor) | |
{ | |
shape.x += shape.size * Math.cos(shape.angle); |
OlderNewer