Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?

C#の便利な機能「ジェネリック」 たとえば、RPGでHPなどを個別に成長させるシステムがあったとして その成長パラメータは、レベルがあがると同じような計算式によって成長していくものであるとすると、以下のようにパラメータクラスを用意しておくと便利かもしれません。 using UnityEngine; using System.Collections; [System.Serializable] public class GrowthParameter<T> { public int level = 1; public T value; }; すると。 GrowthParameter<int> hp = new GrowthParameter<int>(); GrowthParameter<float> reloadTime = new GrowthParameter<float>(); hp
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く