This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#-------------------------------------------------------------------------- | |
# ● 同位置のイベント起動判定 | |
#-------------------------------------------------------------------------- | |
def check_event_trigger_here(triggers) | |
result = false | |
# イベント実行中の場合 | |
if $game_system.map_interpreter.running? | |
return result | |
end | |
# 全イベントのループ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def _Sleep(duration as single) as IEnumerator: | |
while duration > 0.0F: | |
unless pause: | |
duration -= Time.deltaTime | |
yield | |
def Sleep(duration as single) as Coroutine: | |
return StartCoroutine(_Sleep(duration)) | |
def _Sleep() as IEnumerator: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UnityEngine | |
class Vibration(MonoBehaviour): | |
private viblator as AndroidJavaObject | |
def Start(): | |
unityPlayer as AndroidJavaClass = AndroidJavaClass("com.unity3d.player.UnityPlayer") | |
currentActivity as AndroidJavaObject = unityPlayer.GetStatic[of AndroidJavaObject]("currentActivity") | |
viblator = currentActivity.Call[of AndroidJavaObject]("getSystemService","vibrator") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UnityEngine | |
import UnityEditor | |
class ColImport(AssetPostprocessor): | |
def OnPreprocessModel(): | |
target as ModelImporter = assetImporter | |
if assetPath.Contains("colliderSrc"): | |
target.globalScale = 1.0F | |
target.normalImportMode = ModelImporterTangentSpaceMode.None |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UnityEngine | |
static class ObjectCache(MonoBehaviour): | |
public pool as Hash = {} | |
public target as Hash = {} | |
# | |
def OCInstantiate(obj as GameObject, pos as Vector3, rot as Quaternion): | |
name as string = obj.name | |
if ObjectCache.pool[name] == null: | |
ObjectCache.target[name] = obj |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UnityEngine | |
import System.Collections | |
class Sound (MonoBehaviour): | |
public soundObject as GameObject # It have only AudioSource component. | |
# | |
public seTable as (AudioClip) | |
public bgmTable as (AudioClip) | |
# | |
private seIndex as Hash = {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 操作用point作成 | |
mapped fn rigPoint x = ( | |
p = x.pos + x.transform.row1 * x.length | |
b = point pos:p size:10 | |
r = x.rotation | |
coordsys local ( | |
b.rotation = r | |
rotate b (angleaxis 90 [0,1,0]) | |
) | |
b.boneEnable=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugin simpleManipulator bonerotManip | |
name:"bonerot" | |
invisible:true | |
( | |
local oldM | |
on canManipulateNode t return classof t == Point and classof t.parent == BoneGeometry | |
on updateGizmos do ( |