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
// 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 |
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
// Gistを使ってシングルファイルを共有できます。 | |
// ブログに貼り付けることもできるので便利! | |
// こういうのが欲しかったんです。 |
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 SphereBooster : MonoBehaviour { | |
// Use this for initialization | |
void Start () { | |
} |
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 SphereBooster : MonoBehaviour { | |
// Use this for initialization | |
void Start () { | |
// 力を加える向きをVector3型で定義 | |
// 今回はX軸から45度の向きに射出するため、XとYを1:1にする |
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
// Update is called once per frame | |
void Update () { | |
// Input.GetKeyUpはキーが一度押された後、それが離された時にTrueを返す | |
// KeyCode.Spaceはスペースキーを表す | |
if (Input.GetKeyUp(KeyCode.Space)){ | |
// Debug.LogでUnityのコンソールに出力できる | |
Debug.Log("スペースキーが押されたよ。"); | |
} | |
} |
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 SphereBooster : MonoBehaviour { | |
// Use this for initialization | |
void Start () { | |
} |
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 SphereBooster : MonoBehaviour { | |
// 飛行中フラグ | |
bool isFlying = false; | |
// ボタン押下フラグ |
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 SphereBooster : MonoBehaviour { | |
// 飛行中フラグ | |
bool isFlying = false; | |
// ボタン押下フラグ |
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 void OnPressedBoostButton(){ | |
isBoostPressed = 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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class SphereBooster : MonoBehaviour { | |
// 飛行中フラグ | |
bool isFlying = false; | |
// ボタン押下フラグ |
OlderNewer