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 System; | |
| using UnityEngine; | |
| using UnityEngine.Events; | |
| using UnityEngine.EventSystems; | |
| public class SecretClickHandler : MonoBehaviour, IPointerClickHandler | |
| { | |
| [SerializeField] | |
| private ClickEvent clickHandler; | |
| [SerializeField] |
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 System; | |
| using UnityEngine; | |
| using UnityEngine.Events; | |
| using UnityEngine.EventSystems; | |
| public class CounterClickHandler : MonoBehaviour, IPointerClickHandler | |
| { | |
| [SerializeField] | |
| private ClickEvent clickHandler; | |
| [SerializeField] |
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
| #include <stdio.h> | |
| #define LOG2 0.693147180559945309417 //log(2) | |
| #define chk_nan(x) x!=x | |
| double log_fast(double x) | |
| { | |
| static double table[17]={ | |
| .0 , // log( 16 /16) | |
| .0606246218164348425806 , // log( 17 /16) | |
| .1177830356563834545387 , // log( 18 /16) |
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 System.Text.RegularExpressions; | |
| using UnityEditor; | |
| using UnityEngine; | |
| public class ToNumbering : EditorWindow | |
| { | |
| private string baseName = ""; | |
| // Add menu item named "My Window" to the Window menu |
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
| [SerializeField] | |
| private float speed = 10f; | |
| void Update () { | |
| transform.Translate (speed * Time.deltaTime, 0, 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
| use std::io; | |
| fn main() { | |
| println!("Please Input Count > "); | |
| let mut count = String::new(); | |
| io::stdin().read_line(&mut count).expect("Failed to read line");; | |
| let count: u64 = count.trim().parse().expect("Need u64"); | |
| println!("PI = {}",wallis_fomula(count)); |
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
| var controller = GetComponent<SteamVRInputRx>(); | |
| controller.ControllerState | |
| .Where(s => s == SteamVRControllerState.TriggerPressDown) | |
| .Subscribe(_ => | |
| { | |
| // Triggerが引かれたら何かをする | |
| }); |
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; | |
| /// <summary> | |
| /// Box–Muller's method | |
| /// </summary> | |
| public class RandomBoxMuller | |
| { | |
| public static float Range(float min, float max) | |
| { | |
| while (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
| VRTK_ControllerEvents controllerEvents = GetComponent<VRTK_ControllerEvents>(); | |
| controllerEvents.TriggerPressedAsObservable() | |
| .Subscribe(_ => | |
| { | |
| Debug.Log("Trigger Pressed!"); | |
| }); | |
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 RxVRTK; | |
| using UniRx; | |
| using UnityEngine; | |
| public class SomeObject : RxVRTK_InteractableObject | |
| { | |
| protected void Start() | |
| { | |
| this.StartUsingAsObservable() | |
| .Subscribe(user => |