This file contains 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 class AsyncTest : MonoBehaviour | |
{ | |
// Start is called before the first frame update | |
void Start() | |
{ | |
// コルーチン実行 | |
StartCoroutine(AsyncCoroutineCaller(() => | |
{ | |
// async/await実行 | |
AsyncTaskCaller(); |
This file contains 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
List<bool> container = new List<bool>(); | |
// containerに値セット | |
var item = container.FirstOrDefault(x => x == true ); |
This file contains 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
// Editorフォルダ配下に配置 | |
using UnityEditor; | |
using UnityEngine; | |
namespace STYLY | |
{ | |
[CustomEditor(typeof(TargetClass))] | |
public class TargetClassInspector : Editor | |
{ | |
public override void OnInspectorGUI() |
This file contains 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 MazeMaker : MonoBehaviour { | |
public delegate void MazeMakerEventHandler(object sender ); | |
public event MazeMakerEventHandler MakeComplete; | |
public int randomSeed = -1; | |
public int xMax; |
This file contains 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 System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class MazeMakerGrow : MonoBehaviour { | |
public bool growOnStart = false; | |
public int xMax = 11; | |
public int yMax = 11; | |
public int zMax = 11; |
This file contains 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 System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class MazeMakerGrowInObj : MonoBehaviour { | |
public bool growOnStart = false; | |
public int xMax = 11; | |
public int yMax = 11; | |
public int zMax = 11; |
This file contains 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 <CoreMotion/CoreMotion.h> | |
-(void) initMotionManager{ | |
// 1.CMMotionManagereより、端末の姿勢情報を取得 | |
_motionManager = [[CMMotionManager alloc] init]; | |
// 更新の間隔を設定する | |
_motionManager.deviceMotionUpdateInterval = 1.0f / 30.0f; | |
// ハンドラを設定する | |
CMDeviceMotionHandler deviceMotionHandler; |
This file contains 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
- (void) doMonitoring{ | |
// Δφ0(t)=-gi/K*Δφ1(t)+gf*Δφ0(t-1) | |
const float gi = 0.5f; | |
const float gf = 1.4f; | |
const float Kinv = 10.0f; | |
const float MAX_VOL = 2.0f; //角速度最大値 | |
// 現在の角度 | |
btScalar angle = pHinge->getHingeAngle(); |
This file contains 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
reg [17:0] voltage; | |
reg [16:0] timer; | |
always @(posedge ADC_CLK) | |
case (state) | |
0 : begin // sense ----------------------------------- | |
if (ADC_DAT == 1) | |
begin | |
if ($signed(voltage) < $signed(18'h1FFFF)) | |
voltage <= voltage + 1; // if not saturated | |
end |
NewerOlder