This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//src_img : 入力画像 | |
void MaxArea_Moment(Mat src_img) { | |
Mat input; | |
cvtColor(src_img, input, CV_BGR2GRAY); | |
Mat Labelmg; | |
Mat stats; | |
Mat centroids; | |
int nLab = connectedComponentsWithStats(input, Labelmg, stats, centroids); | |
int Max = 0; | |
int MaxID = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class Sample | |
{ | |
public static void AddMethod(this 拡張したいクラス self ) | |
{ | |
//処理 | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class Sample | |
{ | |
public static void AddMethod(this 拡張したいクラス self , int v) | |
{ | |
//処理 | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class Sample | |
{ | |
public static void process(this PlayerPrefs self) | |
{ | |
//処理 | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Start() | |
{ | |
PlayerPrefs.process(); <-- これは不可能 | |
PlayerPrefs p = new PlayerPrefs(); | |
p.process(); <--これは可能 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Start() | |
{ | |
SpriteRenderer s = gameObject.GetComponent<SpriteRenderer>(); | |
//Sprite | |
s.sprite = Resources.Load<Sprite>("Image FilePath"); | |
//Color | |
s.color = new Color(1.0f, 1.0f, 1.0f, 1.0f);//(r,g,b,a); | |
//0 <= r,g,b,a <= 1.0f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Clock : MonoBehaviour | |
{ | |
public bool isProgress = true; | |
public GameObject HourHandle; | |
public GameObject MinHandle; | |
public int hour; | |
public int min; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void setup(){ | |
size(1000,1000); | |
background(255,255,255); | |
Draw_val(); | |
} | |
void Draw_val(){ | |
float one_rad = 360 / 60; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using System.Linq; | |
public class ShapeRenderer : MonoBehaviour { | |
private Dictionary<string, int> ShapeKeyList; | |
public void SetMesh(GameObject TargetObject) |