Code Cleanup: naming conventions
This commit is contained in:
parent
abe59f86b1
commit
41c48b42a8
17 changed files with 22 additions and 22 deletions
|
@ -1,7 +1,7 @@
|
|||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class endingScore : MonoBehaviour
|
||||
public class EndingScore : MonoBehaviour
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
|
@ -1,7 +1,7 @@
|
|||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class goal : MonoBehaviour
|
||||
public class Goal : MonoBehaviour
|
||||
{
|
||||
private void OnCollisionEnter2D(Collision2D other)
|
||||
{
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
public class GroundCheck : MonoBehaviour
|
||||
{
|
||||
GameObject Player;
|
||||
GameObject player;
|
||||
private LayerMask solidLayer;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
Player = gameObject.transform.parent.gameObject;
|
||||
player = gameObject.transform.parent.gameObject;
|
||||
solidLayer = LayerMask.GetMask("SolidObject");
|
||||
}
|
||||
private void OnCollisionEnter2D(Collision2D collision)
|
||||
|
@ -15,7 +15,7 @@ public class GroundCheck : MonoBehaviour
|
|||
if (collision.collider.CompareTag("Ground") || collision.collider.CompareTag("Platform") || collision.collider.CompareTag("Tetromino"))
|
||||
{
|
||||
Debug.Log("Now standing on "+ collision.collider.name);
|
||||
Player.GetComponent<Movement2D>().isGrounded = true;
|
||||
player.GetComponent<Movement2D>().isGrounded = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ public class GroundCheck : MonoBehaviour
|
|||
if (GetComponent<BoxCollider2D>().IsTouchingLayers(solidLayer) == false)
|
||||
{
|
||||
Debug.Log("No longer standing on " + collision.collider.name);
|
||||
Player.GetComponent<Movement2D>().isGrounded = false;
|
||||
player.GetComponent<Movement2D>().isGrounded = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ using UnityEngine;
|
|||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class introCutsceneDialog : MonoBehaviour
|
||||
public class IntroCutsceneDialog : MonoBehaviour
|
||||
{
|
||||
private int currentDialog = 0;
|
||||
public GameObject dialogBoxObject;
|
|
@ -1,14 +1,14 @@
|
|||
using UnityEngine;
|
||||
|
||||
public class startTrigger : MonoBehaviour
|
||||
public class StartTrigger : MonoBehaviour
|
||||
{
|
||||
private tetrominoSpawnManager TetrominoSpawnManager;
|
||||
private TetrominoSpawnManager tetrominoSpawnManager;
|
||||
private bool gameStarted;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
TetrominoSpawnManager = FindObjectOfType<tetrominoSpawnManager>();
|
||||
tetrominoSpawnManager = FindObjectOfType<TetrominoSpawnManager>();
|
||||
}
|
||||
|
||||
private void OnTriggerEnter2D(Collider2D other)
|
||||
|
@ -16,7 +16,7 @@ public class startTrigger : MonoBehaviour
|
|||
if (other.gameObject.tag == "Player" && !gameStarted)
|
||||
{
|
||||
GetComponent<AudioSource>().Play();
|
||||
TetrominoSpawnManager.spawnTetromino();
|
||||
tetrominoSpawnManager.spawnTetromino();
|
||||
gameStarted = true;
|
||||
gameObject.SetActive(false);
|
||||
}
|
|
@ -2,13 +2,13 @@ using UnityEngine;
|
|||
using UnityEngine.SceneManagement;
|
||||
using Random = UnityEngine.Random;
|
||||
|
||||
public class tetromino : MonoBehaviour
|
||||
public class Tetromino : MonoBehaviour
|
||||
{
|
||||
public float timeBetweenSteps;
|
||||
public bool active = true;
|
||||
|
||||
private tetrominoUserControl TetrominoUserControl;
|
||||
private tetrominoSpawnManager TetrominoSpawnManager;
|
||||
private TetrominoUserControl tetrominoUserControl;
|
||||
private TetrominoSpawnManager tetrominoSpawnManager;
|
||||
|
||||
private float stepTimer = 0.0f;
|
||||
private bool wouldCollide = false;
|
||||
|
@ -38,9 +38,9 @@ public class tetromino : MonoBehaviour
|
|||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
TetrominoSpawnManager = FindObjectOfType<tetrominoSpawnManager>();
|
||||
TetrominoUserControl = FindObjectOfType<tetrominoUserControl>();
|
||||
TetrominoUserControl.setActiveTetromino(gameObject);
|
||||
tetrominoSpawnManager = FindObjectOfType<TetrominoSpawnManager>();
|
||||
tetrominoUserControl = FindObjectOfType<TetrominoUserControl>();
|
||||
tetrominoUserControl.setActiveTetromino(gameObject);
|
||||
|
||||
//set tetromino color to a random pairing
|
||||
int newColor = Random.Range(1, 7);
|
||||
|
@ -87,8 +87,8 @@ public class tetromino : MonoBehaviour
|
|||
{
|
||||
GetComponent<AudioSource>().Play();
|
||||
active = false;
|
||||
TetrominoUserControl.unsetActiveTetromino();
|
||||
TetrominoSpawnManager.spawnTetromino();
|
||||
tetrominoUserControl.unsetActiveTetromino();
|
||||
tetrominoSpawnManager.spawnTetromino();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
using UnityEngine;
|
||||
using Random = UnityEngine.Random;
|
||||
|
||||
public class tetrominoSpawnManager : MonoBehaviour
|
||||
public class TetrominoSpawnManager : MonoBehaviour
|
||||
{
|
||||
public Vector3 spawnPoint;
|
||||
public GameObject tetrominoSquare;
|
|
@ -1,7 +1,7 @@
|
|||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class tetrominoUserControl : MonoBehaviour
|
||||
public class TetrominoUserControl : MonoBehaviour
|
||||
{
|
||||
public GameObject activeTetromino;
|
||||
private AudioSource audioSource;
|
|
@ -1,7 +1,7 @@
|
|||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class titleButtonsControl : MonoBehaviour
|
||||
public class TitleButtonsControl : MonoBehaviour
|
||||
{
|
||||
public void startButtonClick()
|
||||
{
|
Loading…
Reference in a new issue