Skip to content

Instantly share code, notes, and snippets.

@maco1028
maco1028 / blossome.rpy
Last active December 12, 2015 02:08
Ren'py Blossom Code
#Renpy Blossom
#桜吹雪
init:
image blossoms = SnowBlossom(Animation("image/sakura.png", 0.5))
#雪降り
image snow = Fixed(
SnowBlossom(im.FactorScale("image/snow.png",1.1),count=15,start=5),
SnowBlossom(im.FactorScale(im.Alpha("image/snow.png",0.8),0.6),count=15,yspeed=(75,150)))
@maco1028
maco1028 / LeftMove.rpy
Last active December 12, 2015 02:09
Renpy Chara Left Move
# Renpy Chara Left Move
init:
$ ch1 = Character("キャラ1", image="Chara01")
image ch1 = "image/chara01.png"
image ch1 smile = "image/chara01_smile.png"
image ch1 sad = "image/chara01_sad.png"
transform smooth:
@maco1028
maco1028 / Default (Windows).sublime-keymap
Last active December 12, 2015 02:58
SublimeText KeyBind
//SublimeText2 KeyBind
//カーソル移動
{ "keys": ["ctrl+j"], "command": "move", "args": {"by": "characters", "forward": false} },
{ "keys": ["ctrl+k"], "command": "move", "args": {"by": "characters", "forward": true} },
{ "keys": ["ctrl+u"], "command": "move", "args": {"by": "lines", "forward": false} },
{ "keys": ["ctrl+m"], "command": "move", "args": {"by": "lines", "forward": true} },
//最行頭カーソル移動
{ "keys": ["shift+ctrl+u"], "command": "move_to", "args": {"to": "bof", "extend": false} },
@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;
@maco1028
maco1028 / uGUIButton.cs
Last active June 2, 2017 05:10
uGUI Button #unity
public void Button1Click () {
Debug.Log("Button Click!");
}
@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 / 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 / ====BATTLE=====.js
Last active December 31, 2015 22:26
RPGツクールMV カテゴリ分け用
//=============================================================================
// カテゴリ分け用
//=============================================================================
/*:
* @plugindesc ==================== BATTLE ====================
* @author maco1028
*
*/
/*:ja
@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 / 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);
}