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
using UnityEngine; | |
using System.Collections; | |
public class RayBlackOut : MonoBehaviour { | |
/// <summary>暗転用黒テクスチャ</summary> | |
private Texture2D blackTexture; | |
/// <summary>フェード中の透明度</summary> | |
private float fadeAlpha = 0; | |
/// <summary>フェード中かどうか</summary> | |
private bool isFading = false; |
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
using UnityEngine; | |
using System.Collections; | |
using UnityEditor; | |
using System.Collections.Generic; | |
public class CreateCameraPos : EditorWindow | |
{ | |
public class CameraPos | |
{ | |
public string BoneNameJP; |
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 fib(x) | |
#ゼロ始まり | |
a = 0 #ふたつ前の結果 | |
b = 1 #ひとつ前の結果 | |
c = 1 #現在の結果 | |
for i in 0..x-1 | |
c = a + b | |
a = b | |
b = c | |
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 yakusu(n) | |
n = n.to_i | |
st = 1 | |
g = 0 | |
lst = [] | |
loop { | |
if (n % st == 0) then | |
lst.push(st) |
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 getbaisu(n,na) | |
head = n.gsub("x","0").to_i | |
st = 0 | |
ed = fact(n.count("x")) #10のx乗を求めたい | |
return 0 | |
end | |
def fact(n) | |
return 1 if n == 0 |
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
public static AnimationClip CreateAnimationClip(VMDFormat format, int interpolationQuality) | |
{ | |
VMDVRoidConverter converter = new VMDVRoidConverter(); | |
//アニメーションクリップを作成 | |
AnimationClip clip = new AnimationClip(); | |
clip.name = "output_test"; | |
//キーフレーム作成 | |
AnimationCurve retCurve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 1)); | |
//カーブ作成 |
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
require "csv" | |
# 各レコードは、改行を区切りとする | |
csv_text = <<~CSV_TEXT | |
aaa,bbb,ccc | |
zzz,yyy,xxx | |
CSV_TEXT | |
CSV.parse(csv_text) do |row| | |
p row |
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
<script> | |
function 野菜を切る() { | |
return new Promise(function(callback) { | |
callback("野菜を切る"); | |
}); | |
} | |
function じっくり炒める(data) { | |
return new Promise(function(callback) { | |
callback(data + "/じっくり炒める"); | |
}); |
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
ご飯を炊く = Ractor.new do | |
"ご飯を炊く" | |
end | |
盛り付け = Ractor.new do |data| | |
Ractor.recv.join('/') + "/盛り付け" | |
end | |
カレー = Ractor.new do | |
野菜を切る = Ractor.new do | |
"野菜を切る" |
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
double grayScaleFromPixel(img.Pixel px) { | |
return (px.r + px.g + px.b) / 3; | |
} | |
bool _hitTest(img.Image? clipImage, int x1, int y1, int x2, int y2, int width, | |
int height) { | |
// 切り抜き画像がnullかどうか | |
if (clipImage == null) { | |
return false; | |
} |
OlderNewer