Skip to content

Instantly share code, notes, and snippets.

View kazumalab's full-sized avatar
🦁
I may be slow to respond.

Kazuma kazumalab

🦁
I may be slow to respond.
View GitHub Profile
@kazumalab
kazumalab / FadeManager.cs
Last active June 29, 2016 15:13
Unityでのフェードイン、フェードアウト
using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class FadeManager : MonoBehaviour { // ここでゲームオーバー処理とクリア処理
// ---------------------------
/// <summary>
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class Demo : MonoBehaviour
{
 private string CONSUMER_KEY = "各自作成";
 private string CONSUMER_SECRET = "各自作成";
@kazumalab
kazumalab / SavWav.cs
Created July 9, 2016 05:42 — forked from darktable/SavWav.cs
Unity3D: script to save an AudioClip as a .wav file.
// Copyright (c) 2012 Calvin Rien
// http://the.darktable.com
//
// This software is provided 'as-is', without any express or implied warranty. In
// no event will the authors be held liable for any damages arising from the use
// of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it freely,
// subject to the following restrictions:
using UnityEngine;
using System.Collections;
public class Movement : MonoBehaviour { // スーパークラス
public int id;
public int physical;
public virtual void move() {
Debug.Log ("override move.");
using UnityEngine;
using System.Collections;
public class Player : Movement, Damage { // サブクラス
// Use this for initialization
void Start () {
move ();
}
using System.Linq; # これが必要
public class LinqSelect {
List<int> lists = new List<int>() {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
void Start () {
IEnumerable<int> list_where = from num in lists
where num > 5
select num;
public class CharactorMainController : MonoBehaviour { // スーパークラス
public Image myself_image;
public Image map_image;
// Move 関数をここに書いてもいい
public virtual void MapCharactorMotion (Image image) {
// Player, Enemyの向いている方向に合わせてimageも回転
image.transform.rotation = Quaternion.Euler (0, 0, -transform.rotation.y * 180);
public class DelegateTest : MonoBehaviour {
public delegate void Callback ();
private Callback callback;
public void SetCallback (Callback _callback) {
this.callback = _callback;
}
using UnityEngine;
using System.Collections;
public class ButtonManagement : MonoBehaviour {
public DelegateTest delegateTest;
public void ClickAttack () {
delegateTest.SetCallback (Attack);
}
@kazumalab
kazumalab / Gmap.cs
Last active October 25, 2016 22:14
using UnityEngine;
using System.Collections;
using System.Xml;
using System;
public class Gmap : MonoBehaviour {
public string PlaceName;
private double latitude;