View Coin.cs
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) | |
{ |
View GameOverManager.cs
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; | |
View EnemyManager.cs
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; | |
View ScoreManager.cs
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; |
View PlayerShooting.cs
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; |
View EnemyHealth.cs
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; |
View EnemyAttack.cs
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; |
View HealthBoost.cs
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; |
View PlayerHealth.cs
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; |
View CameraFollow.cs
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