Skip to content

Instantly share code, notes, and snippets.

View TeraokaAkihiro's full-sized avatar

Teraoka Akihiro TeraokaAkihiro

View GitHub Profile
// [Unity3D]2点を通る垂直なオブジェクトを生成する
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class wallSet : MonoBehaviour {
public Vector3[] point = new Vector3[] {};
void Start () {
焼肉VRのアイデアを適当に並べておく
ジャンル:シミュレーションゲーム
プレイ人数:1
概要:制限時間内に焼肉焼いて食ってスコアを稼ごう。
大体の流れ:
1.肉を注文する
2.お皿に乗った肉が出て来る
3.お肉を網に乗せる
4.裏が焼けるまで待つ
5.ひっくり返す
// ぴにゃタワーVRの判定用スクリプト
// OnTriggerでpinyaのタグついたオブジェクトをカウント
// [未実装]掴んでいるオブジェクトは含まないようにする。
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GameManager : MonoBehaviour {
bool isFailed = false; // Pinya got out → true
@TeraokaAkihiro
TeraokaAkihiro / clockController.cs
Last active May 9, 2017 05:01
Unityでアナログ時計を動かしてみる。 ref: http://qiita.com/teraokaakihiro/items/ccaca6872e4515c2bf1c
using System; // DateTimeに必要
using System.Collections;
using UnityEngine;
public class clockController : MonoBehaviour {
public bool sec; // 秒針の有無
public bool secTick; // 秒針を秒ごとに動かすか
public GameObject hour;
@TeraokaAkihiro
TeraokaAkihiro / MouseMover
Created April 28, 2017 06:51
物理挙動でマウスに追尾するスクリプト
using UnityEngine;
public class MouseMover : MonoBehaviour {
public float speed; // 大きい程早く動く
private GameObject obj;
private Rigidbody2D rb;
void Start ()
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@TeraokaAkihiro
TeraokaAkihiro / TileController.cs
Created August 26, 2017 08:24
WallpaperEngine向け、タイル表示
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TileController : MonoBehaviour {
public GameObject tilePrefab;
public GameObject[,] tile;
private int tileX,tileY;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using VRTK.Highlighters; //usingは忘れがちなので忘れずに
public class SetOutline : MonoBehaviour {
VRTK_OutlineObjectCopyHighlighter vrtk_outline;
void Start ()
@TeraokaAkihiro
TeraokaAkihiro / LoockChange.cs
Last active July 4, 2018 04:22
【Unity】カメラから見えなくなったときの判定方法 ref: https://qiita.com/teraokaakihiro/items/5e8f74ac3685d4937a5b
using UnityEngine;
public class LookChange : MonoBehaviour {
private bool fMaterial = false;
[SerializeField]
private Material mat01;
[SerializeField]
private Material mat02;
@TeraokaAkihiro
TeraokaAkihiro / file0.txt
Created August 21, 2018 13:59
WindowsのWSLで始める競技プログラミング(C++) ref: https://qiita.com/teraokaakihiro/items/f051c81809135b0cec84
$ sudo apt install g++