Skip to content

Instantly share code, notes, and snippets.

View Tsumio's full-sized avatar
🏠
Working from home

Tsumio Tsumio

🏠
Working from home
  • Japan
View GitHub Profile
@Tsumio
Tsumio / hoge.js
Last active October 31, 2017 06:54
Test gist
refresh() {
this.bitmap.clear();
this.createTroutArray();
this.refreshTroutData();
this.drawCalendar();
}
@Tsumio
Tsumio / test2.js
Created October 31, 2017 06:56
Test2
//Test
@Tsumio
Tsumio / repeatSample.cs
Last active November 12, 2017 10:48
C#Sample
private void MoveDownCursor() {
//this.CurrentNum = (this.CurrentNum + 1) % this.MaxMenuNum; -> これが直に計算した場合の方法
this.CurrentNum = (int)Mathf.Repeat(++this.CurrentNum, this.MaxMenuNum);
}
private void MoveUpCursor() {
//this.CurrentNum = (this.CurrentNum + (MaxMenuNum-1)) % this.MaxMenuNum; -> これが直に計算した場合の方法
this.CurrentNum = (int)Mathf.Repeat(--this.CurrentNum, this.MaxMenuNum);
}
@Tsumio
Tsumio / PasswordChecker.cs
Last active January 3, 2018 03:40
Login System Sample
using System;
using System.Collections.Generic;
namespace ConsoleApp3 {
class Program {
static void Main(string[] args) {
IUserInputtingReceiver main = new UserInputtingReceiver();
main.StartChecking();
}
@Tsumio
Tsumio / BB_ShopCostPlus.js
Created January 8, 2018 11:24
Bug fix version of BB plugin.
//=============================================================================
// BB_ShopCostPlus.js
// Copyright (c) 2018 BB ENTERTAINMENT
//=============================================================================
/*:
* @plugindesc ショップでの売買時にコストを一つ追加するプラグイン
* @author ビービー(ツミオが一部修正)
*
* @param 起動スイッチ
@Tsumio
Tsumio / actions.js
Last active January 13, 2018 11:15
ArraySample
'use strict';
class Predicates {
static hpLessThanHalf(value, index) {
return value.mhp/2 > value.hp;
}
static isMaxHP(value, index) {
return value.mhp === value.hp;
}
@Tsumio
Tsumio / ChainOfMpCost.js
Created February 2, 2018 05:24
For blog.
(function() {
'use strict';
////=============================================================================
//// Game_Actor
//// Override for Chain MP cost.
////=============================================================================
Game_Actor.prototype.canPaySkillCost = function(skill) {
return this._tp >= this.skillTpCost(skill) && ChainManager.getPartyMP() >= this.skillMpCost(skill);
};
@Tsumio
Tsumio / ILipSynchSources.cs
Last active May 19, 2018 05:40
EmofuriStaticLipSynch
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// リップシンクのソースを表すインターフェイス
/// </summary>
public interface ILipSynchSources {
////=============================================================================
@Tsumio
Tsumio / DIPSampleInterfaces.cs
Last active May 24, 2018 11:57
DIPのサンプルインターフェイスまとめ
/// <summary>
/// 英語の読めるよ
/// </summary>
internal interface IEnglishReadable {
void ReadEnglish();
}
/// <summary>
/// 英語書けるよ
/// </summary>
/// <summary>
/// 大卒
/// </summary>
internal class CollegeGraduate : IGraduatesState {
public void DoWorking() {
Console.WriteLine("大卒並の仕事をしたナリよ。");
}
}
/// <summary>