Skip to content

Instantly share code, notes, and snippets.

View anzfactory's full-sized avatar
:octocat:
Working from home

anz anzfactory

:octocat:
Working from home
View GitHub Profile
@anzfactory
anzfactory / MessageQueueSystem.cs
Last active May 30, 2016 15:05
メッセージログ風な表示をするやつ http://anz-note.tumblr.com/post/145086980021
/*********************************
* メッセージキューシステム
* 2016-05-29
*********************************/
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Assertions;
@anzfactory
anzfactory / SqliteMigration.cs
Last active December 4, 2015 17:43
SQLite差分アップデート(SQLiteUnityKit版)
/*********************************
SQLiteのdbを差分アップデートする奴
2015-12-04
*********************************/
using System.Collections.Generic;
using UnityEngine;
public class SqliteMigration
{
private SqliteDatabase dbInstance;
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/handsontable/0.20.0/handsontable.full.min.css">
<style>
#wrapper {
display: -webkit-box;
display: -moz-box;
display: box;
@anzfactory
anzfactory / ChangeColor.cs
Last active November 9, 2015 16:53
iTweenでuGUIの色をかえる
using UnityEngine;
using UnityEngine.UI;
public class ChangeColor : MonoBehaviour
{
private Image target;
private Color originalColor;
void Awake()
{
@anzfactory
anzfactory / ClickHandler.cs
Created October 25, 2015 11:53
unityでタップされたオブジェクト処理てきな
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.EventSystems;
public class ClickHandler : MonoBehaviour, IPointerClickHandler
{
[SerializeField]
private ClickEvent clickHandler;
public void OnPointerClick(PointerEventData eventData)
@anzfactory
anzfactory / ButtonAdapter.cs
Created August 25, 2015 14:33
複数Buttonの同時発動を禁止するやつ
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
public class ButtonAdapter : MonoBehaviour
{
public Button[] Buttons;
private GameObject firstSelected = null;
@anzfactory
anzfactory / ButtonGroup.cs
Created August 24, 2015 14:07
[Unity]子buttonを全部押し続けた場合に何か処理したい..てきな?
using UnityEngine;
using UnityEngine.EventSystems;
public class ButtonGroup : MonoBehaviour
{
public GameObject[] buttons;
private int counter = 0;
using UnityEngine;
using Callback = System.Action<UnityEngine.GameObject>;
public class ITweenAdapter : MonoBehaviour
{
// 接続するアニメーションタイプ
// 必要になったら順次追加
public enum RunType {
ScaleTo
}
@anzfactory
anzfactory / ScrollController.cs
Last active November 6, 2015 03:00
ScrollRectのスクロールチェンジをユーザー操作以外の場合は上部固定にするやつ
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
public class ScrollController : MonoBehaviour, IInitializePotentialDragHandler, IEndDragHandler
{
public enum ScrollState {
Wait,
BeginDrag,
EndDrag
@anzfactory
anzfactory / hoge.cs
Created June 25, 2015 02:56
itween callback sample
public class Hoge : MonoBehaviour {
void MoveA ()
{
Action callback = () => {
// 何か処理
};
iTween.MoveBy (gameObject, iTween.Hash("y",1f,"time",0.5f, "oncomplete", "Fin", "oncompleteparams", callback));
}
void MoveB ()
{