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; | |
public class InputTime : MonoBehaviour | |
{ | |
public Animator animator; | |
// Start is called before the first frame update | |
void Start() | |
{ | |
animator = GetComponent<Animator>(); |
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 SS_Matsuda : MonoBehaviour | |
{ | |
private void Update() | |
{ | |
// スペースキーが押されたら | |
if (Input.GetKeyDown(KeyCode.Space)) |
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 Example : MonoBehaviour | |
{ | |
private int hp; | |
public int GetHp () | |
{ | |
return hp; |
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 Example : 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
<!doctype html> | |
<html lang="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width,initial-scale=1"> | |
<title>タイトル</title> | |
</head> | |
<body> | |
<h1>見出し</h1> |
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
float deg; //Degree | |
float rad; //Radian | |
//180° | |
deg = 180.0f; | |
//πラジアン | |
rad = Mathf.PI; | |
//180°はπラジアン≒3.141593 | |
Debug.Log(deg * Mathf.Deg2Rad); |
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 Cube : MonoBehaviour | |
{ | |
void Update() | |
{ | |
//Wキーが押されたら、0,1,0へ移動. | |
if (Input.GetKeyDown(KeyCode.W)) | |
{ |
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; | |
using System.IO; | |
using System; | |
/// <summary> | |
/// Unityでテキストファイルを読み書きする. | |
/// このファイルは静的クラスのため「Standard Assets」または「Plugins」フォルダーに配置する. | |
/// このファイルは静的クラスのため特定のオブジェクトにアタッチしてはいけない. | |
/// </summary> |
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; | |
using System.IO; | |
public class FileIO : MonoBehaviour | |
{ | |
//ファイル名. | |
private string fileName = "theFile.txt"; | |
//データパス. | |
private string dataPath; |
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; | |
using System.Collections.Generic; | |
public class DrawDraggingLine : MonoBehaviour | |
{ | |
//ドラッグ中に真. | |
private bool isDragging = false; | |
//線の座標リスト. | |
private List<Vector3> linePoints = new List<Vector3> (); |
NewerOlder