コード例 #1
0
ファイル: BuffDisplayer.cs プロジェクト: wuxin0602/Nothing
 private void Stop(GameObject parent, MyPoolManager pool, IDictionary<GameObject, GameObject> buffMap)
 {
     if (pool == null)
     {
         return;
     }
     var buff = buffMap[parent];
     buffMap.Remove(parent);
     pool.Return(buff);
     StopBuff(buff);
 }
コード例 #2
0
 // Use this for initialization
 void Start()
 {
     Instance = this;
 }
コード例 #3
0
 public MyClass(MyPoolManager manager)
 {
     this.manager = manager;
 }
コード例 #4
0
ファイル: BuffDisplayer.cs プロジェクト: wuxin0602/Nothing
    private float Take(GameObject parent, MyPoolManager pool, IDictionary<GameObject, GameObject> buffMap)
    {
        if (pool == null)
        {
            return 0f;
        }

        if (!buffMap.ContainsKey(parent))
        {
            buffMap[parent] = pool.Take();
        }
        var buff = buffMap[parent];
        buff.SetActive(true);
        SetParent(buff, parent);

        return Initialize(buffMap[parent]);
    }
コード例 #5
0
	// Use this for initialization
	void Start () {
		Instance = this;
	}