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 / ANZTextStyle.h
Last active March 23, 2017 15:13
NSAttributedStringをちょっとは使いやすくするやーつ
#import <Foundation/Foundation.h>
@interface ANZTextStyle : NSObject
@property (nonatomic, readonly) ANZTextStyle *(^text)(NSString *text);
@property (nonatomic, readonly) ANZTextStyle *(^lineHeight)(CGFloat height);
@property (nonatomic, readonly) ANZTextStyle *(^breakMode)(NSLineBreakMode mode);
@property (nonatomic, readonly) ANZTextStyle *(^align)(NSTextAlignment align);
@property (nonatomic, readonly) ANZTextStyle *(^color)(UIColor *color);
@property (nonatomic, readonly) ANZTextStyle *(^font)(UIFont *font);
@anzfactory
anzfactory / ButtonConvert.cs
Created December 21, 2016 13:43
[Unity]base64エンコードされた画像を表示するサンプル
using UnityEngine;
using UnityEngine.UI;
using System.IO;
using System.Text;
using System;
public class ButtonConvert : MonoBehaviour
{
[SerializeField] private Image image;
public void OnClick()
@anzfactory
anzfactory / Vector3Extension.cs
Last active August 17, 2022 15:48
[Unity]ワールド座標をスクリーン座標へ変換するクラス拡張
/*********************************
2015-06-20
Vector3拡張
座標変換参考:http://tsubakit1.hateblo.jp/entry/2016/03/01/020510
*********************************/
using UnityEngine;
using UnityEngine.Assertions;
public static class Vector3Extension
{
/*********************************
* ゲージ
*********************************/
using UnityEngine;
using UnityEngine.UI;
using DG.Tweening;
public class Guage : MonoBehaviour
{
/// <summary>
@anzfactory
anzfactory / Talk.cs
Last active November 23, 2019 12:35
会話イベントをタイムライン風に表示するやーつ http://anz-note.tumblr.com/post/145359548501
/*********************************
* 会話イベントをタイムライン風に表示するやーつ
* 参考:http://tsubakit1.hateblo.jp/entry/2015/10/19/022720
*********************************/
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Talk : MonoBehaviour
@anzfactory
anzfactory / FlipImage.cs
Last active June 1, 2016 15:12
画像を裏返すようなアニメーション
/*********************************
* Flipしたときに画像差し替えたいな
* with DOTween
*********************************/
using System;
using UnityEngine;
using UnityEngine.UI;
using DG.Tweening;
@anzfactory
anzfactory / ExpandButton.cs
Last active June 4, 2016 04:39
タップすると子ボタンを展開して表示するやつ http://anz-note.tumblr.com/post/145208947906
/*********************************
* フロートメニューっていうかあれの展開(笑)
* with DOTween
*********************************/
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Events;
@anzfactory
anzfactory / Number.cs
Last active May 31, 2016 16:51
数字テキストを良い感じにアニメーションさせて表示するやつ http://anz-note.tumblr.com/post/145157295266
/*********************************
* 数字テキストを良い感じにアニメーションして
* 表示するやーつ
*********************************/
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using DG.Tweening;