コード例 #1
0
    private void Update()
    {
        foreach (PowerupType type in powerupQueue.Keys)
        {
            if (activePowerups.ContainsKey(type) && (!activePowerups.ContainsKey(type) || activePowerups[type]) ||
                powerupQueue[type].Count <= 0)
            {
                continue;
            }

            PowerupHandle       activePowerupHandle = powerupQueue[type].Dequeue();
            PowerupIconInstance powerupIconInstance = activePowerupHandle.IconGameObject.AddComponent <PowerupIconInstance>();
            powerupIconInstance.Initialize(activePowerupHandle);
            activePowerups[type] = true;
        }
    }
コード例 #2
0
 public void Initialize(PowerupHandle handle)
 {
     powerupHandle = handle;
 }