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 System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class csDistance : MonoBehaviour { | |
//거리를 구하기 위한 게임 오브젝트들의 트랜스폼을 저장할 변수 선언. | |
public Transform box1; | |
public Transform box2; | |
public Transform box3; |
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 System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class csCoroutine2 : MonoBehaviour { | |
//비동기 작업이 끝날 때까지 댁시 | |
public string url; //웹 주소를 저장할 스트링 변수를 퍼블릭으로 선언한다. | |
WWW www; //WWW 타입의 변수를 선언한다. |
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 System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEditor; // need | |
public class csGameManager : MonoBehaviour { | |
// 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 System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class SpriteManager : MonoBehaviour { | |
public UISprite icon; | |
// 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 System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class TouchScreenEx : MonoBehaviour { | |
//손가락을 화면에 닿은 상태에서 움직이면 물체가 움직인다 | |
void Update () { | |
if(Input.touchCount > 0 ){ |
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
Shader "Custom/NewSurfaceShader" { | |
Properties { // 인스펙터 창에서 보여주는 | |
_Brightness("Change Brightness!!", Range(0,1)) = 0.5 | |
_TestFloat("Test Float!!", Float) = 0.5 | |
_TestColor("Test Color!!", Color) = (1,1,1,1) | |
_TestVector("Test Vector", Vector) = (1,1,1,1) | |
_TestTexture("Test Texture",2D) = "white" {} | |
_Color ("Color", Color) = (1,1,1,1) | |
_MainTex ("Albedo (RGB)", 2D) = "white" {} | |
_Glossiness ("Smoothness", Range(0,1)) = 0.5 |
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
Shader "Custom/Tex" { | |
Properties { | |
/// | |
/// "Albedo (RGB)" : Albedo 텍스쳐를 넣는 곳이고, 알파는 사용하지 않고 RGB 채널만 사용하겠다는 의미. | |
/// 2D : 이 인터페이스가 2D 텍스쳐를 받는 부분이라는 의미. | |
/// "white"{} : 는 이 텍스쳐가 인터페이스가 처음 생겨서 아무것도 들어 있지 않을 때. 흰색 텍스쳐가 들어있다고 생각되도록 만들라는 의미 | |
_MainTex ("Albedo (RGB)", 2D) = "white" {} // 텍스쳐를 입력받는 변수. | |
} | |
SubShader { |
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
// 2D 플레이어 x축 움직임 제한 | |
private void ScreenCheck(){ | |
Vector3 worldPos = Camera.WorldToViewportPoint(this.transform.position); | |
if(worldPos.x < 0.05f) worldPos.x = 0.05f; | |
if(worldPos.x > 0.95f) worldPos.x = 0.95f; | |
this.transform.position = Camera.main.ViewportToWorldPoint(worldPos); | |
} |
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; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Text.RegularExpressions; | |
public class CSVReader | |
{ | |
static string SPLIT_RE = @",(?=(?:[^""]*""[^""]*"")*(?![^""]*""))"; | |
static string LINE_SPLIT_RE = @"\r\n|\n\r|\n|\r"; |