This file contains hidden or 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
1. 1XX | |
정보 전달: 요청을 받았고, 작업을 진행 중이라는 의미이다. HTTP/1.0 이후 정의되지 않았다. 서버들도 클라이언트에게 이 코드를 보내지는 않는다. 단 101의 경우 WebSocket등에서 쓰인다. | |
100 Continue | |
101 Switching Protocols | |
102 Processing | |
2. 2XX |
This file contains hidden or 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 PlayerCtrl : MonoBehaviour { | |
public float speed = 6f; // The speed that the player will move at. | |
Vector3 movement; // The vector to store the direction of the player's movement. | |
Animator anim; // Reference to the animator component. |
This file contains hidden or 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 CameraCtrl : MonoBehaviour { | |
public Transform target; // The position that that camera will be following. | |
public float smoothing = 5f; // The speed with which the camera will be following. | |
Vector3 offset; // The initial offset from the target. |
This file contains hidden or 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; | |
using UnityEngine.AI; | |
public class EnemyCtrl : MonoBehaviour { | |
Transform player; // Reference to the player's position. | |
PlayerHealth playerHealth; // Reference to the player's health. | |
EnemyHealth enemyHealth; // Reference to this enemy's health. |
This file contains hidden or 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; | |
using UnityEngine.UI; | |
public class PlayerHPCtrl : MonoBehaviour { | |
public int startingHealth = 100; // The amount of health the player starts the game with. | |
public int currentHealth; // The current health the player has. | |
public Slider healthSlider; // Reference to the UI's health bar. |
This file contains hidden or 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 EnemyATTCtrl : MonoBehaviour { | |
public float timeBetweenAttacks = 0.5f; // The time in seconds between each attack. | |
public int attackDamage = 10; // The amount of health taken away per attack. | |
This file contains hidden or 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 PlayerATTCtrl : MonoBehaviour { | |
public int damagePerShot = 20; | |
public float timeBetweenBullets = 0.15f; | |
public float range = 100f; |
This file contains hidden or 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; // The player's score. | |
Text text; // Reference to the Text component. |
This file contains hidden or 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 EnemyHPCtrl : MonoBehaviour { | |
public int startingHealth = 100; | |
public int currentHealth; | |
public float sinkSpeed = 2.5f; | |
public int scoreValue = 10; |