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 class HelloWorld | |
{ | |
public static void Main() | |
{ | |
System.Console.WriteLine("Hello, World!"); | |
} | |
} |
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
class StaticInt{ | |
static int n; | |
static void Main(){ | |
System.Console.WriteLine(n); | |
n = 999; | |
System.Console.WriteLine(n); | |
} | |
} |
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 PlayerMovement : MonoBehaviour | |
{ | |
public float speed = 6f; | |
Vector3 movement; | |
Animator anim; | |
Rigidbody playerRigidbody; | |
int floorMask; |
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 CameraFollow : MonoBehaviour | |
{ | |
public Transform target; | |
public float smoothing = 5f; | |
Vector3 offset; |
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; | |
class ConsoleInput{ | |
static void Main(){ | |
string input; | |
input=Console.ReadLine(); | |
Console.WriteLine(input); | |
} | |
} |
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 ScreenCapture : MonoBehaviour { | |
//キャプチャーの開始・終了. | |
private bool rec = false; | |
//照合キー. | |
private char checkKey; | |
//日付. |
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; | |
//MonoBehaviourを継承しない. | |
public static class GameManager | |
{ | |
//メンバーは全てstaticにする. | |
private static int score; | |
public static void AddScore (int p) |
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 ExampleClass : MonoBehaviour { | |
void Update () { | |
if (Input.GetButtonDown ("Fire1")) { | |
GameManager.AddScore (100); | |
Debug.Log (GameManager.GetScore ()); | |
} | |
} |
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 RB2DCtrl : MonoBehaviour | |
{ | |
void Update () | |
{ | |
if (Input.GetButtonDown ("Fire1")) { | |
GetComponent<Rigidbody2D> ().isKinematic = !GetComponent<Rigidbody2D> ().isKinematic; | |
} |
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 RB2DCtrl : MonoBehaviour | |
{ | |
void Update () | |
{ | |
if (Input.GetButtonDown ("Fire1")) { | |
rigidbody2D.isKinematic = !rigidbody2D.isKinematic; | |
} |
OlderNewer