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 Array : MonoBehaviour { | |
enum Helo{Hello,Welcome,Chao}//ここはそのまま書くかつスタートの外で宣言 | |
void Start(){ | |
Helo h = Helo.Chao; | |
switch (h) { |
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 Array : MonoBehaviour { | |
struct Helo{ | |
public string name; | |
public string maker; | |
public int price; |
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 KeyCodePra : 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 UnityEngine; | |
using System.Collections; | |
public class KeyCodePra : MonoBehaviour { | |
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 UnityEngine; | |
using System.Collections; | |
public class AnimationPra : MonoBehaviour { | |
// Use this for initialization | |
void Start () { | |
//AnimationClip:アニメーションの本体 | |
//AnimationCurve:値変化のための曲線のグラフ | |
//Keyframe:○○が経過したときに、プロパティの値を○○にするということを指定したのがキーフレーム |
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 AnimationPra : MonoBehaviour { | |
// Use this for initialization | |
void Start () { | |
//1つめのアニメーションクリップ | |
AnimationClip clipA = new AnimationClip (); |
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 AnimationPra : MonoBehaviour { | |
// Use this for initialization | |
void Start () { | |
//1つめのアニメーションクリップ | |
AnimationClip clipA = new AnimationClip (); |
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 UpDownAnimation : MonoBehaviour { | |
public float endtime; | |
public float topposition; | |
//x or y or z | |
public string direction; | |
// 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 UnityEngine; | |
using System.Collections; | |
public class myscript : MonoBehaviour { | |
// int counter =0; | |
// GameObject obj = null; | |
// Use this for initialization | |
void Start () { | |
GameObject[] objs = GameObject.FindGameObjectsWithTag ("Player"); |
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 float pram; | |
void OnCollisionEnter(Collision collision){ | |
if (collision.gameObject.tag == "Player") { | |
//弾の速度を取得 | |
Vector3 v = rigidbody.velocity; | |
Debug.Log (v); | |
//加力 | |
float x = v.x * pram; |