Code Cleanup: naming conventions

This commit is contained in:
Kaj Forney 2022-10-07 14:54:24 -06:00
parent abe59f86b1
commit 41c48b42a8
Signed by: kforney
GPG key ID: 3AB4E2E04CEF656F
17 changed files with 22 additions and 22 deletions

View file

@ -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()

View file

@ -1,7 +1,7 @@
using UnityEngine;
using UnityEngine.SceneManagement;
public class goal : MonoBehaviour
public class Goal : MonoBehaviour
{
private void OnCollisionEnter2D(Collision2D other)
{

View file

@ -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;
}
}
}

View file

@ -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;

View file

@ -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);
}

View file

@ -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();
}
}

View file

@ -1,7 +1,7 @@
using UnityEngine;
using Random = UnityEngine.Random;
public class tetrominoSpawnManager : MonoBehaviour
public class TetrominoSpawnManager : MonoBehaviour
{
public Vector3 spawnPoint;
public GameObject tetrominoSquare;

View file

@ -1,7 +1,7 @@
using UnityEngine;
using UnityEngine.SceneManagement;
public class tetrominoUserControl : MonoBehaviour
public class TetrominoUserControl : MonoBehaviour
{
public GameObject activeTetromino;
private AudioSource audioSource;

View file

@ -1,7 +1,7 @@
using UnityEngine;
using UnityEngine.SceneManagement;
public class titleButtonsControl : MonoBehaviour
public class TitleButtonsControl : MonoBehaviour
{
public void startButtonClick()
{