Last active
June 16, 2017 01:27
-
-
Save muzudho/7eab8806e0d21a31a52239d0f4569003 to your computer and use it in GitHub Desktop.
ゲーム開発を受注しようぜ<その5> ref: http://qiita.com/muzudho1/items/c2d57d16fbab3db50f86
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
//レイヤーマスク作成 | |
int layerMask = LayerMask.NameToLayer("UI"); |
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
// Update is called once per frame | |
void Update () { | |
#region テスト・コード | |
// とりあえず、どんどんメーターが減っていくコードを書いてみる。 | |
if (0<rectTransform_cache.sizeDelta.x) | |
{ | |
rectTransform_cache.sizeDelta = new Vector2(rectTransform_cache.sizeDelta.x - 1.0f, rectTransform_cache.sizeDelta.y); | |
} | |
#endregion | |
} |
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
// Update is called once per frame | |
void Update () { | |
#region テスト・コード | |
// とりあえず、どんどんメーターが減っていくコードを書いてみる。 | |
if (0<value) | |
{ | |
Add(-1); | |
} | |
#endregion | |
// 内部データと表示データが合っていない場合、表示データを更新する | |
if (dirty) | |
{ | |
rectTransform_cache.sizeDelta = new Vector2(rectTransform_cache.sizeDelta.x * value / maxValue, rectTransform_cache.sizeDelta.y); | |
dirty = false; // (2017-06-15 Add)忘れていたので追記 | |
} | |
} |
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
if (dirty) | |
{ | |
rectTransform_cache.sizeDelta = new Vector2(widthMax_cache * value / maxValue, rectTransform_cache.sizeDelta.y); | |
dirty = false; // (2017-06-15 Add)忘れていたので追記 | |
} |
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
設計図_クラス図(分割3b).pu | |
→H,J,M,Pへ。 | |
設計図_クラス図(分割3S)_0616.pu | |
→SとTへ。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment