Skip to content

Instantly share code, notes, and snippets.

View IJEMIN's full-sized avatar

I_Jemin IJEMIN

View GitHub Profile
@IJEMIN
IJEMIN / Filter.py
Created November 8, 2015 12:39
Pure Python Box Blur Source.
# Box Blur Algorithm from Gerdus van Zyl <gerdusvanzyl@gmail.com>
# 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
@IJEMIN
IJEMIN / LiveCharacter.cs
Last active May 18, 2020 14:31
Live2D Unity example codes 유니티 라이브2D 예제 코드
//created by I_Jemin (i_jemin@hotmail.com)
//게임 개발직 구직중..
//참고 자료 http://www.slideshare.net/dongrimshin/live2d-48240587
//L2D로 시작되는 클래스들은 UpdateParam이라는 메소드를 가지고 있습니다.
//해당 메소드에 Live2DModelUnity 인스턴스를 집어넣으면, 해당 인스턴스가 가리키는 캐릭터의 (표정 등)의 각각 수치가 업데이트 됩니다.
//라이브2D의 표정 모션 등의 정보는 바이트 코드로 받아야 합니다. 라이브2D 확장자를 유니티가 그대로 받아들일 수 없습니다.
@IJEMIN
IJEMIN / Animal.cs
Last active February 7, 2017 11:27
유니티 C# 스크립트, 클래스와 오브젝트 교육
// 이 튜토리얼 코드는, Derek Benas 의 C# 교육 코드를 유니티 스크립트 교육 맞춰 간단하게 고친것임을 밝힌다.
class Animal
{
// public : 접근 제한이 없다
// protected : 현재 클래스와 자식 클래스에서만 접근 가능
// private : 현재 클래스에서만 접근 가능
// 클래스 내부의 변수를 필드라고 부른다.
class Player: MonoBehaviour{
///// 코드 뭉치들..
public float checkRadius; // 체크할 반경
void Update() {
// 중심으로 부터 원을 그려서 겹치는 모든 콜라이더2D 들을 배열로 가져옴
Collider2D detectedColliders = Physics2D.OverlapCircle(transform.position, checkRadius);
//하나씩 순회하면서 만약에 타입 A를 가진 친구가 있다면 실행하고 나머지 코드는 무시
foreach (Collider2D target in detectedColliders)
@IJEMIN
IJEMIN / PlayCloudDataManager.cs
Last active November 7, 2023 12:08
Unity Google Cloud Saved Game Data Manager Script
// 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
@IJEMIN
IJEMIN / ExportPackage.cs
Created December 3, 2017 10:08
Unity Export Package with Tag and Layers and Input Settings
// 단순 유니티 패키지 제작용 스크립트
using UnityEngine;
using System.Collections;
using UnityEditor;
public static class ExportPackage {
//Add Symbol "USING_GOOGLE_MOBILE_ADS" to Build Setting after import GoogleMobileAds library from here https://github.com/googleads/googleads-mobile-unity
#if USING_GOOGLE_MOBILE_ADS
using UnityEngine;
//using System.Collections;
using GoogleMobileAds.Api;
public class AdmobBannerLoader : MonoBehaviour {
public string adUnitId;
@IJEMIN
IJEMIN / RayByAngle.cs
Created January 20, 2018 12:07
How to Raycast by Angle in Unity
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
@IJEMIN
IJEMIN / ImageLoader.cs
Created January 20, 2018 12:32
Load sprite from local file path, and load sprite in UI Image.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using System.IO;
// 로컬 이미지 파일 경로를 주면 해당 경로에서 이미지를 로드해 UI Image로 띄어주는 코드
public class ImageLoader : MonoBehaviour {
// 스프라이트를 로드할 이미지 컴포넌트
@IJEMIN
IJEMIN / TermalRed.shader
Created January 20, 2018 18:58
Thermal Effect on Unity Shader
Shader "Custom/TermalRed" {
Properties {
_NormalTex("Normal Texture",2D) = "white" {}
_DistanceFadeOut("DistanceFadeOut",Range(0,3)) = 0
}
SubShader {
Tags { "RenderType"="Opaque" }
LOD 200