Skip to content

Instantly share code, notes, and snippets.

@tklee1975
tklee1975 / AnimatedLineShader.shader
Created September 9, 2017 16:44
Shader with special line effect on the images
Shader "ShaderTest/AnimatedLineShader"
{
Properties
{
_Speed ("Speed", Range(1,10)) = 5
_LineSize ("Line Size", Range(0.01, 0.1)) = 0.01
_LineColor ("Line Color", Color) = (0.8,0.8,0.1,1.00)
[PerRendererData]_MainTex ("Texture Input",2D) = "white" {}
}
SubShader
@tklee1975
tklee1975 / start_node_server.sh
Created September 15, 2017 16:39
Start and Stop a Node Server in Background
#!/bin/sh
node node_server.js >> node_server.log &
@tklee1975
tklee1975 / Tank.cs
Created October 16, 2017 19:56
Linked Prefab Sample Code
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Tank : MonoBehaviour {
// Link to Other Prefabs
public GameObject bulletPrefab;
public class TankFactory : MonoBehaviour {
public TankMaster tankMasterPrefab;
public GameObject[] tankModelList;
//public Dictionary<int, GameObject> tankModelDict = new Dictionary<int, GameObject>();
// Use this for initialization
public GameObject CreateModel(int tankID) {
// Get the Model Prefab
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using DG.Tweening;
namespace Aurora.PingBall
{
public class PBStageGameView : BaseUI {
@tklee1975
tklee1975 / SimpleRoadTile.cs
Last active November 6, 2021 21:53
Simple Road Auto Tile Logic (#unity #scriptable_tile)
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Tilemaps;
#if UNITY_EDITOR
using UnityEditor;
#endif
@tklee1975
tklee1975 / MoveController2D.cs
Created January 29, 2018 19:32
Move Script for 2d Object in Unity
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace SimpleTDD {
public class TDDController2D : MonoBehaviour {
public enum MoveType {
SimpleTranslate,
RaycastCheck,
};
@tklee1975
tklee1975 / RadicalCircle.cs
Last active March 9, 2018 08:35
Code Snippet Unity Radical Circle
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class RadicalCircle : MonoBehaviour {
// Color of the Circle
[SerializeField]
public Color color = Color.blue;
@tklee1975
tklee1975 / http_server.js
Created April 15, 2018 20:04
an extremely simple NODE Server using HTTPS and HTTP
const http = require("http");
http.createServer((req, res) => {
res.writeHead(200);
res.end("<html><p>Hello HTTP!! <br/>Greeting from Kencoder!</p></html>\n");
}).listen(8000);
@tklee1975
tklee1975 / TestTableViewCell.cs
Created April 2, 2019 07:58
Sample Code for TSTable (Simple Scenario)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using Tacticsoft;
public class TestTableViewCell : TableViewCell
{
[SerializeField] public Text m_rowText;