Skip to content

Instantly share code, notes, and snippets.

@todorok1
todorok1 / reg_git_agent.txt
Last active April 7, 2018 13:41
command line for my blog.
// https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/ より。
// 1. まずはssh-agentをバックグラウンドで動かす
$ eval "$(ssh-agent -s)"
// 2. macOS Sierra(10.12)以降は ~/.ssh/config も編集する
Host *
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_rsa
@todorok1
todorok1 / about_gist.txt
Created April 7, 2018 15:38
Gist preview.
// Gistを使ってシングルファイルを共有できます。
// ブログに貼り付けることもできるので便利!
// こういうのが欲しかったんです。
@todorok1
todorok1 / SphereBooster_0.cs
Last active April 9, 2018 05:37
Unityチュートリアル・斜方投射のスクリプト。
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SphereBooster : MonoBehaviour {
// Use this for initialization
void Start () {
}
@todorok1
todorok1 / SphereBooster_1.cs
Last active April 9, 2018 09:45
Unityチュートリアル・斜方投射のスクリプト。
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SphereBooster : MonoBehaviour {
// Use this for initialization
void Start () {
// 力を加える向きをVector3型で定義
// 今回はX軸から45度の向きに射出するため、XとYを1:1にする
@todorok1
todorok1 / SphereBooster_2.cs
Last active April 9, 2018 09:52
Unityチュートリアル・キー入力のスクリプト。
// Update is called once per frame
void Update () {
// Input.GetKeyUpはキーが一度押された後、それが離された時にTrueを返す
// KeyCode.Spaceはスペースキーを表す
if (Input.GetKeyUp(KeyCode.Space)){
// Debug.LogでUnityのコンソールに出力できる
Debug.Log("スペースキーが押されたよ。");
}
}
@todorok1
todorok1 / SphereBooster_3.cs
Last active April 9, 2018 09:51
Unityチュートリアル・キー入力のスクリプト。
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SphereBooster : MonoBehaviour {
// Use this for initialization
void Start () {
}
@todorok1
todorok1 / SphereBooster_4.cs
Last active April 10, 2018 09:34
Unityチュートリアル・キー入力のスクリプト。
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SphereBooster : MonoBehaviour {
// 飛行中フラグ
bool isFlying = false;
// ボタン押下フラグ
@todorok1
todorok1 / SphereBooster_5.cs
Last active April 10, 2018 16:19
Unityチュートリアル・ボタンの処理実装のスクリプト。
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SphereBooster : MonoBehaviour {
// 飛行中フラグ
bool isFlying = false;
// ボタン押下フラグ
@todorok1
todorok1 / SphereBooster_6.cs
Created April 10, 2018 12:35
Unityチュートリアル・キー入力のスクリプト。
public void OnPressedBoostButton(){
isBoostPressed = true;
}
@todorok1
todorok1 / SphereBooster_7.cs
Created April 10, 2018 13:35
Unityチュートリアル・キー入力のスクリプト。
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SphereBooster : MonoBehaviour {
// 飛行中フラグ
bool isFlying = false;
// ボタン押下フラグ