Skip to content

Instantly share code, notes, and snippets.

View chunkof's full-sized avatar

chunkof chunkof

View GitHub Profile
@chunkof
chunkof / knockout.bind.touch.js
Last active February 11, 2016 07:16
knockoutjs用:click / touchstart / pointerdown に対応したカスタムバインディング
(function() {
// enum
var TYPE = {INDETERMINATE:0, CLICK:1, TOUCH:2, POINTER:3};
// common
var EventType = (navigator.pointerEnabled) ? TYPE.POINTER : TYPE.INDETERMINATE;
var IndeterminateList = [];
//--------
// Append CustomBinding "touchStart"
//--------
ko.bindingHandlers.touchStart ={
@chunkof
chunkof / chunkof_EternalLoading.js
Created January 18, 2016 17:02
永遠にロード画面のプラグイン
// author chunkof
// ライセンス:MIT
// 自由に改編・使用ください。
(function() {
SceneManager.updateScene = function() {
};
})();
@chunkof
chunkof / chunkof_SuguniGameOver.js
Last active January 18, 2016 17:05
すぐにゲームオーバーになるプラグイン
// author chunkof
// ライセンス:MIT
// 自由に改編・使用ください。
(function() {
Scene_Boot.prototype.start = function() {
Scene_Base.prototype.start.call(this);
SoundManager.preloadImportantSounds();
SceneManager.goto(Scene_Gameover);
this.updateDocumentTitle();
@chunkof
chunkof / GameOverToSkipTitle.js
Last active January 18, 2016 16:55
ゲームオーバーの後にタイトル画面に戻らず、「はじめから」ゲーム開始。
// @chunkof
// ライセンス:MIT
// 自由に改変・使用ください。
Scene_Gameover.prototype.gotoTitle = function() {
DataManager.setupNewGame();
SceneManager.goto(Scene_Map);
};
// author chunkof (http://chunkof.net/)
// ライセンス:MIT
// 自由に改変・使用ください。
(function() {
//--------------------
var _DataManager_setupNewGame = DataManager.setupNewGame;
DataManager.setupNewGame = function(){
// start
var startMapId = getQueryVariable('map');
(function() {
Utils.canReadGameFiles = function() {
return true;
};
WebAudio.prototype._load = function(url) {
// todo:実装
};
@chunkof
chunkof / chunkof_MoveRoute.js
Last active December 30, 2015 07:56
RPGツクールMV用プラグイン(未整理) 移動ルートイベントの「抜け設定」「速度」をオートで
/*
* @author chunkof
* LICENSE:MIT
*/
(function() {
// 移動ルートイベント開始時に「すり抜けON」「速度1/2」にする。
var Game_Character_forceMoveRoute = Game_Character.prototype.forceMoveRoute;
Game_Character.prototype.forceMoveRoute = function(moveRoute) {
Game_Character_forceMoveRoute.call(this,moveRoute);
//=============================================================================
// chunkof_SaveControl.js
//=============================================================================
(function() {
DataManager.isThisGameFile = function(savefileId) {
var savefile = this.loadSavefileInfo(savefileId);
if (!savefile) {
return false;