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 | |
public var xSpeed : int; | |
public var ySpeed : int; | |
public var randomX : boolean = false; | |
public var minXSpeed : int = 100; | |
public var maxXSpeed : int = 200; | |
public var randomY : boolean = false; |
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 | |
public var speed : float = 10f; | |
function Update () { | |
var move = Vector3(Input.GetAxis("Horizontal"), Input.GetAxis("Vertical"), 0); | |
transform.position += move * speed * Time.deltaTime; | |
} |
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 | |
public var expl : GameObject; | |
function OnTriggerEnter2D (other : Collider2D) | |
{ | |
var newPos : Vector3 = new Vector3(gameObject.transform.position.x, gameObject.transform.position.y, 0); | |
Instantiate(expl, newPos, Quaternion.identity); | |
Destroy(gameObject); | |
} |
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
General | |
Duration 0.20 | |
Looping Off | |
Start Lifetime 1 | |
Start Speed 10 | |
Start Rotation 0-360 | |
Emission | |
Rate 70 | |
Shape | |
Shape Sphere |
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 | |
public var coinEffect : GameObject; | |
function OnTriggerEnter2D (other : Collider2D) | |
{ | |
if (coinEffect) | |
Instantiate(coinEffect, transform.position, transform.rotation); | |
Destroy(gameObject); |
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 | |
private var aSource : AudioSource; | |
function Start () | |
{ | |
aSource = GetComponent.<AudioSource>(); | |
} | |
function OnTriggerEnter2D () |
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 | |
public var coinEffect : GameObject; | |
private var soundFX : AudioSource; | |
function Start() | |
{ | |
soundFX = GetComponent.<AudioSource>(); | |
} |
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 | |
public var showDelay : float = 0.2; | |
public var startHidden : bool = true; | |
function Awake() | |
{ | |
if (startHidden) | |
gameObject.renderer.enabled = false; | |
} |
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 | |
private var aSource : AudioSource; | |
function Start () | |
{ | |
aSource = GetComponent.<AudioSource>(); | |
} | |
function OnTriggerEnter2D () |
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 | |
public var gObj : GameObject; | |
public var minX : float; | |
public var maxX : float; | |
public var minY : float; | |
public var maxY : float; | |
public var startDelay : float = 0f; |