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
#pragma strict | |
var damage = 20; | |
var vel = Vector2(0,10); | |
var boom : AudioClip; | |
function Start () { | |
rigidbody2D.velocity = vel; | |
} |
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 ChangeOnCollision : MonoBehaviour { | |
private Material myMaterial; | |
void Start () { | |
myMaterial = GetComponent<Renderer>().material; | |
} |
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 ChangeOnCollision : MonoBehaviour { | |
private Material myMaterial; | |
// Use this for initialization | |
void Start () { | |
myMaterial = GetComponent<Renderer>().material; |
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 FormationController : MonoBehaviour { | |
public GameObject enemyPrefab; | |
public float width = 10; | |
public float height = 5; | |
public float speed; | |
public float padding; | |
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
find ./ -type d -exec du -sh {} \; |
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
find ./ -name *.txt -type f -exec sed -i 's/old/new/g' {} \; |
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
ls -1 > ALLFILES | |
sort MANIFEST MANIFEST ALLFILES| uniq -u | xargs rm |
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
ls -1 | sort MANIFEST MANIFEST - | uniq -u | xargs rm |
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
#! /usr/bin/env python | |
import xml.etree.ElementTree as ET | |
import Image | |
import ImageDraw | |
import numpy as np | |
import sys, re, os | |
files = os.listdir(sys.argv[1]) | |
files.sort() | |
regex = re.compile("[0-9]+\.xml") |
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
// Will work as expected | |
"foo|bar|spam|eggs".split("\\|"); | |
//will get a compilation error | |
"foo|bar|spam|eggs".split("\|"); | |
//will split on each character | |
"foo|bar|spam|eggs".split("|"); |
OlderNewer