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 Controller2D : MonoBehaviour { | |
// Player Movement | |
public float moveSpeed; | |
public float jumpHeight; | |
// No Stick |
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 PlayerController : MonoBehaviour { | |
//Player movement variables | |
public float moveSpeed; | |
public float jumpHeight; | |
private bool doubleJump; |
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 DeathBox : MonoBehaviour { | |
void OnTriggerEnter2D (Collider2D other){ | |
if(other.name == "Player") | |
{ | |
Debug.Log("Player Enters Death Zone"); |
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; | |
// Use this for initialization |
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 CoinPickup : MonoBehaviour { | |
public int pointsToAdd; | |
void OnTriggerEnter2D (Collider2D other) | |
{ | |
if(other.GetComponent<PlayerController>()== null) |
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 CheckPoint : MonoBehaviour { | |
public LevelManager levelManager; | |
// Use this for initialization | |
void Start () { | |
levelManager = FindObjectOfType <LevelManager>(); |
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 KillPlayer : MonoBehaviour { | |
public LevelManager levelManager; | |
// Use this for initialization | |
void Start () { |
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 LevelManager : MonoBehaviour { | |
public GameObject currentCheckPoint; | |
private Controller2D player; | |
// Particles | |
public GameObject deathParticle; |
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 DestroyFinishedParticle : MonoBehaviour { | |
private ParticleSystem thisParticleSystem; | |
// Use this for initialization | |
void Start () { | |
thisParticleSystem = GetComponent<ParticleSystem>(); |
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 CoinPickup : MonoBehaviour { | |
public int pointsToAdd; | |
void OnTriggerEnter2D (Collider2D other){ | |
if (other.GetComponent<Controller2D> () == null) | |
return; |
OlderNewer