Skip to content

Instantly share code, notes, and snippets.

using UnityEngine;
using System.Collections;
public class Score : Global {
GUIStyle labelStyle;
// Update is called once per frame
void Update () {
using UnityEngine;
using System.Collections;
public class Generation : MonoBehaviour {
public GameObject Prefab1;
public GameObject Prefab2;
public GameObject Prefab3;
public GameObject Prefab4;
public GameObject Prefab5;
using UnityEngine;
using System.Collections;
public class Drag : MonoBehaviour {
private Vector3 screenPoint;
private Vector3 offset;
// Use this for initialization
void Start () {
void OnCollisionEnter2D(Collision2D col)
{
if (col.gameObject.tag == "tag1") {
Destroy(col.gameObject);
score += 10;
Debug.Log(score);
}
}
using UnityEngine;
using System.Collections;
public class Global : MonoBehaviour {
public static int score = 0;
}
using UnityEngine;
using System.Collections;
public class Crash1 : Global {
// Use this for initialization
void Start () {
}
using UnityEngine;
using System.Collections;
public class EnemyTracking : MonoBehaviour {
public Vector2 speed = new Vector2(0.05f,0.05f);
public GameObject targetobject;
private float rad;
private Vector2 Position;
using UnityEngine;
using System.Collections;
public class Switch : MonoBehaviour {
public AudioClip audioClip1;
// Use this for initialization
void Start () {
using UnityEngine;
using System.Collections;
public class Switch : MonoBehaviour {
public AudioClip audioClip1;
// Use this for initialization
void Start () {
//audioSource = GetComponent<AudioSource> ();
using UnityEngine;
using System.Collections;
public class Switch : MonoBehaviour {
// Use this for initialization
void Start () {
}