Skip to content

Instantly share code, notes, and snippets.

View Curookie's full-sized avatar
🏠
Working from home

Curookie Curookie

🏠
Working from home
View GitHub Profile
@Curookie
Curookie / HTTP 상태 코드
Created November 7, 2017 06:52
HTTP 상태 코드
1. 1XX
정보 전달: 요청을 받았고, 작업을 진행 중이라는 의미이다. HTTP/1.0 이후 정의되지 않았다. 서버들도 클라이언트에게 이 코드를 보내지는 않는다. 단 101의 경우 WebSocket등에서 쓰인다.
100 Continue
101 Switching Protocols
102 Processing
2. 2XX
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.
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.
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.
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.
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.
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;
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.
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;