Skip to content

Instantly share code, notes, and snippets.

@maco1028
maco1028 / hide_change.cs
Created May 6, 2017 18:49
表示非表示1
public class Hoge : MonoBehaviour
{
private int _frame = 0;
// Use this for initialization
void Start ()
{
}
@maco1028
maco1028 / ParticleCol.cs
Created May 5, 2017 19:06
パーティクル衝突
void OnParticleCollision(GameObject objct){
//衝突したオブジェクトタグがenemyだった場合、オブジェクトを破壊する
if(obj.gameObject.tag == "enemy"){
Object.Destroy(gameObject);
}
}
Shader "Custom/Snow" {
Properties {
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Albedo (RGB)", 2D) = "white" {}
_Glossiness ("Smoothness", Range(0,1)) = 0.5
_Metallic ("Metallic", Range(0,1)) = 0.0
_Snow("Snow", Range(0,2))= 0.0
}
SubShader {
Tags { }
@maco1028
maco1028 / Backscroll.cs
Created May 5, 2017 05:03
背景スクロール
using UnityEngine;
using System.Collections;
public class Backscroll : MonoBehaviour
{
void Update () {
transform.Translate (-0.1f, 0, 0);
if (transform.position.x < -13.8f ) {
transform.position = new Vector3 (13.8f, 0, 0);
}
@maco1028
maco1028 / Parameter.js
Last active January 1, 2016 18:18
Parameter Set
//RPG Maker MV Parameter
* @param Name
* @desc Desc
* Default: true or Number or String
* @default true or Number or String
@maco1028
maco1028 / ====BATTLE=====.js
Last active December 31, 2015 22:26
RPGツクールMV カテゴリ分け用
//=============================================================================
// カテゴリ分け用
//=============================================================================
/*:
* @plugindesc ==================== BATTLE ====================
* @author maco1028
*
*/
/*:ja
@maco1028
maco1028 / CharactorMove.cs
Last active December 14, 2015 22:41
CharactorMove
using UnityEngine;
using System.Collections;
public class CharactorMove : MonoBehaviour {
public float walkSpeed = 7.0f; //歩く速度
public float gravity = 10.0f;//重力加速度
private Vector3 velocity;//現在の速度
void Update () {
//CharacterControllerを取得
@maco1028
maco1028 / Destory_obj.cs
Last active July 10, 2017 14:59
オブジェクトランダムに追加
using UnityEngine;
using System.Collections;
public class Destory_obj : MonoBehaviour {
public GameObject obj;
void Awake(){
InvokeRepeating ("Create", Random.Range(3.0f,5.0f), Random.Range(3.0f,5.0f));
}
@maco1028
maco1028 / uGUIButton.cs
Last active June 2, 2017 05:10
uGUI Button #unity
public void Button1Click () {
Debug.Log("Button Click!");
}
@maco1028
maco1028 / Random_Switch.cs
Last active May 5, 2017 05:01
Random_Switch #unity
public int anime_num = 0; anime_num = Random.Range (1,5); switch(anime_num) { case 1: print("Atack1"); break; case 2: print("Run"); break; case3: print("walk"); break;