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
# Box Blur Algorithm from Gerdus van Zyl <[email protected]> | |
# it's a slow.it's not good to realtime stuff. Still it works without any other python library based on C. | |
# Need pypng(pure tiny python image library) for extractiing pixel array of png file. | |
# Portable. Just put png.py from pypng to your project with this file. | |
# This source gonna save your file with name "FINAL.PNG" Reccomend modifying for your project. | |
import png | |
import array |
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
//created by I_Jemin ([email protected]) | |
//게임 개발직 구직중.. | |
//참고 자료 http://www.slideshare.net/dongrimshin/live2d-48240587 | |
//L2D로 시작되는 클래스들은 UpdateParam이라는 메소드를 가지고 있습니다. | |
//해당 메소드에 Live2DModelUnity 인스턴스를 집어넣으면, 해당 인스턴스가 가리키는 캐릭터의 (표정 등)의 각각 수치가 업데이트 됩니다. | |
//라이브2D의 표정 모션 등의 정보는 바이트 코드로 받아야 합니다. 라이브2D 확장자를 유니티가 그대로 받아들일 수 없습니다. |
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
// 이 튜토리얼 코드는, Derek Benas 의 C# 교육 코드를 유니티 스크립트 교육 맞춰 간단하게 고친것임을 밝힌다. | |
class Animal | |
{ | |
// public : 접근 제한이 없다 | |
// protected : 현재 클래스와 자식 클래스에서만 접근 가능 | |
// private : 현재 클래스에서만 접근 가능 | |
// 클래스 내부의 변수를 필드라고 부른다. |
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
class Player: MonoBehaviour{ | |
///// 코드 뭉치들.. | |
public float checkRadius; // 체크할 반경 | |
void Update() { | |
// 중심으로 부터 원을 그려서 겹치는 모든 콜라이더2D 들을 배열로 가져옴 | |
Collider2D detectedColliders = Physics2D.OverlapCircle(transform.position, checkRadius); | |
//하나씩 순회하면서 만약에 타입 A를 가진 친구가 있다면 실행하고 나머지 코드는 무시 | |
foreach (Collider2D target in detectedColliders) |
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
// code reference: http://answers.unity3d.com/questions/894995/how-to-saveload-with-google-play-services.html | |
// you need to import https://github.com/playgameservices/play-games-plugin-for-unity | |
using UnityEngine; | |
using System; | |
using System.Collections; | |
//gpg | |
using GooglePlayGames; | |
using GooglePlayGames.BasicApi; | |
using GooglePlayGames.BasicApi.SavedGame; | |
//for encoding |
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.Collections; | |
using UnityEditor; | |
public static class ExportPackage { | |
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 RayByAngle : MonoBehaviour { | |
public float angle; | |
public float distance = 1f; | |
// Update is called once per frame |
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 UnityEngine.UI; | |
using System.IO; | |
// 로컬 이미지 파일 경로를 주면 해당 경로에서 이미지를 로드해 UI Image로 띄어주는 코드 | |
public class ImageLoader : MonoBehaviour { | |
// 스프라이트를 로드할 이미지 컴포넌트 |
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/TermalRed" { | |
Properties { | |
_NormalTex("Normal Texture",2D) = "white" {} | |
_DistanceFadeOut("DistanceFadeOut",Range(0,3)) = 0 | |
} | |
SubShader { | |
Tags { "RenderType"="Opaque" } | |
LOD 200 |
OlderNewer