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; | |
public class Coin : MonoBehaviour | |
{ | |
public int scoreValue = 25; | |
public GameObject player; | |
public GameObject coin; | |
void OnTriggerEnter (Collider other) | |
{ |
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; | |
public class GameOverManager : MonoBehaviour | |
{ | |
public PlayerHealth playerHealth; | |
Animator anim; | |
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; | |
public class EnemyManager : MonoBehaviour | |
{ | |
public PlayerHealth playerHealth; | |
public GameObject enemy; | |
public float spawnTime = 3f; | |
public Transform[] spawnPoints; | |
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 UnityEngine.UI; | |
using System.Collections; | |
public class ScoreManager : MonoBehaviour | |
{ | |
public static int score; | |
Text text; |
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; | |
public class PlayerShooting : MonoBehaviour | |
{ | |
public int damagePerShot = 20; | |
public float timeBetweenBullets = 0.15f; | |
public float range = 100f; | |
float timer; |
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; | |
public class EnemyHealth : MonoBehaviour | |
{ | |
public int startingHealth = 100; | |
public int currentHealth; | |
public float sinkSpeed = 2.5f; | |
public int scoreValue = 10; | |
public AudioClip deathClip; |
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 EnemyAttack : MonoBehaviour | |
{ | |
public float timeBetweenAttacks = 0.5f; | |
public int attackDamage = 10; | |
Animator anim; |
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; | |
using UnityEngine.UI; | |
public class HealthBoost : MonoBehaviour | |
{ | |
//public Animator anim; | |
public GameObject player; | |
public GameObject healthItem; | |
public PlayerHealth ph; |
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 UnityEngine.UI; | |
using System.Collections; | |
using UnityEngine.SceneManagement; | |
public class PlayerHealth : MonoBehaviour | |
{ | |
public int startingHealth = 100; | |
public int currentHealth; |
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.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class CameraFollow : MonoBehaviour { | |
public Transform target; | |
public float smoothing = 5f; | |
Vector3 offset; |
NewerOlder