Skip to content

Instantly share code, notes, and snippets.

Lee JunHo shoridevel

Block or report user

Report or block shoridevel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View scrollable_view_test.dart
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
View circle_indicator.dart
import 'package:flutter/material.dart';
class CircleIndicator {
static Widget show() {
return Center(
child: new SizedBox(
height: 50.0,
width: 50.0,
child: new CircularProgressIndicator(
value: null,
View utils.dart
class Utils {
static bool isNullOrEmpty(String s) {
return s == null || s == '';
}
static String stripTags(String s) {
return s.replaceAll(new RegExp('<[^>]*>'), '');
}
static Set<String> urlMatchs(String s) {
View Scratch.cs
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
public class Scratch : MonoBehaviour, IPointerClickHandler, IBeginDragHandler, IDragHandler {
[SerializeField]
private Image m_Image;
private Texture2D m_TmpTexture;
private RectTransform m_ImageRT;
View itween.cs
void OnTriggerStay(Collider other) {
ins = Instantiate(PlusMoneyPrefab) as GameObject;
Vector3 startPosition = new Vector3(startX, startY, -1);
ins.transform.parent = Respawn.transform;
ins.transform.localPosition = startPosition;
ins.transform.localScale = new Vector3(50, 50, 0);
Hashtable parameters = new Hashtable();
parameters.Add("y", startY + 80);
@shoridevel
shoridevel / center.cs
Created Aug 30, 2013
【Unity】GUITextureの画像を真ん中に表示する2つ方法 ref: http://qiita.com/shori0917/items/f32f9fcbce165c18e623
View center.cs
void Start () {
background = GetComponent<GUITexture>().texture;
}
void OnGUI(){
GUI.DrawTexture(new Rect(Screen.width / 2 - 128, Screen.height / 2 - 128, background.width,
background.width), background);
}
@shoridevel
shoridevel / qiita.cs
Created Aug 30, 2013
【Unity】GUITextureを真ん中で表示する方法2つ ref: http://qiita.com/shori0917/items/2f302bb8badb5e6d5ffe
View qiita.cs
void Start () {
background = GetComponent<GUITexture>().texture;
}
void OnGUI(){
GUI.DrawTexture(new Rect(Screen.width / 2 - 128, Screen.height / 2 - 128, background.width,
background.width), background);
}
@shoridevel
shoridevel / file0.cs
Created Dec 21, 2015
【Unity】Pluginsフォルダーのスクリプトから本体スクリプトを呼び出したい ref: http://qiita.com/shoridevel/items/9f4b15b1c129e0fb6213
View file0.cs
void Start ()
{
// 実行中にManagersという名前のゲームオブジェクトを探す
var GUIMessageHelper = GameObject.Find ("Managers");
// ゲームオブジェクトに付いているコンポーネントを名前から探す
var comp = GUIMessageHelper.GetComponent ("GUIMessageHelper");
// 呼び出したいメソッドのパラメータを作る。ここではDictionary<string, string>型
var messageDic = new Dictionary<string, string>
{
{ "MapPos", transform.position.ToString()}
@shoridevel
shoridevel / Player.cs
Created Jul 27, 2013
【Unity】【NGUI】NGUIにVirtual Joystick(NGUI用)を追加してみた ref: http://qiita.com/shori0917/items/0b3237eb13889d3ea053
View Player.cs
UIJoystick joystick;
void Start() {
this.joystick = GameObject.FindGameObjectWithTag("Joystick").GetComponent<UIJoystick>();
}
void Update() {
if (this.joystick.position.y > 0)
{
@shoridevel
shoridevel / file0.txt
Created Jul 7, 2013
【Unity】【NGUI】2D Sprite画像1枚で手動で位置座標を入れてみたメモ ref: http://qiita.com/shori0917/items/300d7bcc81d7dccc0cd6
View file0.txt
"1.png":
{
"frame": {"x":4,"y":4,"w":33,"h":43},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":33,"h":43},
"sourceSize": {"w":33,"h":43}
}
"2.png":
{
You can’t perform that action at this time.