Skip to content

Instantly share code, notes, and snippets.

Avatar
🔥
still chose you

Jonathan Yin JonathanYin

🔥
still chose you
  • University of California, San Diego
  • Palo Alto, California
View GitHub Profile
View Coin.cs
using UnityEngine;
public class Coin : MonoBehaviour
{
public int scoreValue = 25;
public GameObject player;
public GameObject coin;
void OnTriggerEnter (Collider other)
{
View GameOverManager.cs
using UnityEngine;
public class GameOverManager : MonoBehaviour
{
public PlayerHealth playerHealth;
Animator anim;
View EnemyManager.cs
using UnityEngine;
public class EnemyManager : MonoBehaviour
{
public PlayerHealth playerHealth;
public GameObject enemy;
public float spawnTime = 3f;
public Transform[] spawnPoints;
View ScoreManager.cs
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class ScoreManager : MonoBehaviour
{
public static int score;
Text text;
View PlayerShooting.cs
using UnityEngine;
public class PlayerShooting : MonoBehaviour
{
public int damagePerShot = 20;
public float timeBetweenBullets = 0.15f;
public float range = 100f;
float timer;
View EnemyHealth.cs
using UnityEngine;
public class EnemyHealth : MonoBehaviour
{
public int startingHealth = 100;
public int currentHealth;
public float sinkSpeed = 2.5f;
public int scoreValue = 10;
public AudioClip deathClip;
View EnemyAttack.cs
using UnityEngine;
using System.Collections;
public class EnemyAttack : MonoBehaviour
{
public float timeBetweenAttacks = 0.5f;
public int attackDamage = 10;
Animator anim;
View HealthBoost.cs
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class HealthBoost : MonoBehaviour
{
//public Animator anim;
public GameObject player;
public GameObject healthItem;
public PlayerHealth ph;
View PlayerHealth.cs
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using UnityEngine.SceneManagement;
public class PlayerHealth : MonoBehaviour
{
public int startingHealth = 100;
public int currentHealth;
View CameraFollow.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CameraFollow : MonoBehaviour {
public Transform target;
public float smoothing = 5f;
Vector3 offset;