Skip to content

Instantly share code, notes, and snippets.

@nabesi777
nabesi777 / HangmanGame.cs
Created September 11, 2018 07:56
ハングマンゲームのC#コード
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace HangMan_Game
{
class Program
{
static void Main(string[] args)
@nabesi777
nabesi777 / NumberGuessingGame.cs
Created September 11, 2018 11:11
NumberGuessingGame C#をゲームで学習
using System;
using System.Collections.Generic;
using System.Text;
namespace NumberGuessingGame
{
class Program
{
static void Main(string[] args)
@nabesi777
nabesi777 / sokoban.cs
Created September 12, 2018 13:46
C# 倉庫番
using System;
using System.Collections.Generic;
using UnityEngine;
public class Sokoban : MonoBehaviour
{
private enum TileType
{
NONE,
GROUND,
@nabesi777
nabesi777 / stack_test.cs
Created September 13, 2018 05:50
unityでstackを使用する。
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Stackster : MonoBehaviour
{
public GameObject stackBase;
public Stack stackster;
@nabesi777
nabesi777 / Face_To_Camera.cs
Created September 13, 2018 11:09
Face_To_Camera C#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Cube : MonoBehaviour
{
Vector3 cubePos;
public bool switching; //Cube往復のオンオフ
@nabesi777
nabesi777 / Face_To_Camera_2.cs
Created September 13, 2018 11:33
Face_To_Camera_2 C#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class FaceTo : MonoBehaviour {
public GameObject cube; //cubeを入れる箱を作成
public Camera mainCamera; //カメラを入れる箱を作成
// Use this for initialization
@nabesi777
nabesi777 / PlayerMove_Rigidbody.cs
Created September 13, 2018 15:23
PlayerMove [Rigidbody] C#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerMove : MonoBehaviour
{
public float speed = 3f;
float moveX = 0f;
float moveZ = 0f;
@nabesi777
nabesi777 / FollowCamera.cs
Created September 13, 2018 16:08
FollowCamera C#
using UnityEngine;
using System.Collections;
public class FollowCamera : MonoBehaviour
{
public GameObject player;  //追いかける対象物のplyaerを入れる箱です。
private Vector3 offset = Vector3.zero;
void Start()
@nabesi777
nabesi777 / CameraSwitch.cs
Created September 13, 2018 23:20
CameraSwitch C# unity
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CameraSwitch : MonoBehaviour
{
bool isSecondary;
public GameObject mainCamera;  //mainCameraオブジェクトを入れる箱をつくる
@nabesi777
nabesi777 / Fallout.cs
Created September 14, 2018 05:25
Fallout C# Unity
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Fallout : MonoBehaviour {
public int lives = 5; //所持ライフ
public Transform respawn; //Inspectorでrespawnを格納
public Transform fallout; //Inspectorでfalloutを格納