private void UpdateWorldObject(IslandTargetGroupMMOItem islandTargetGroupMmoItem)
 {
     if (gameObjectIdToTransformMap.ContainsKey(islandTargetGroupMmoItem.Id.Id))
     {
         Transform x = gameObjectIdToTransformMap[islandTargetGroupMmoItem.Id.Id];
         if (!(x != null))
         {
         }
     }
 }
    private void onServerObjectItemAdded(DataEntityHandle handle, ServerObjectItemData obj)
    {
        IslandTargetGroupMMOItem islandTargetGroupMMOItem = obj.Item as IslandTargetGroupMMOItem;

        if (islandTargetGroupMMOItem != null)
        {
            onIslandGroupMMOItemAdded(handle, obj, islandTargetGroupMMOItem);
            return;
        }
        IslandTargetMMOItem islandTargetMMOItem = obj.Item as IslandTargetMMOItem;

        if (islandTargetMMOItem != null)
        {
            onIslandTargetMMOItemAdded(handle, obj, islandTargetMMOItem);
            return;
        }
        IslandTargetPlaygroundStatsMMOItem islandTargetPlaygroundStatsMMOItem = obj.Item as IslandTargetPlaygroundStatsMMOItem;

        if (islandTargetPlaygroundStatsMMOItem != null)
        {
            onIslandTargetPlaygroundStatsMMOItemAdded(handle, obj, islandTargetPlaygroundStatsMMOItem);
        }
    }
    private IEnumerator DelayNextRoundStart(float waitTime, IslandTargetGroupMMOItem islandTargetGroupMmoItem, bool isFinalRound)
    {
        yield return(new WaitForSeconds(waitTime));

        dispatcher.DispatchEvent(new IslandTargetsEvents.GameRoundStarted(islandTargetGroupMmoItem.Starts, islandTargetGroupMmoItem.Expires, isFinalRound));
    }
    private void onIslandGroupMMOItemAdded(DataEntityHandle handle, ServerObjectItemData serverObjectItemData, IslandTargetGroupMMOItem islandTargetGroupMmoItem)
    {
        if (dataModelHandleListenersMap.ContainsKey(handle) || !childrenPaths.Contains(islandTargetGroupMmoItem.Path))
        {
            return;
        }
        Transform transform = base.gameObject.transform.Find(islandTargetGroupMmoItem.Path);

        if (transform != null)
        {
            transform.gameObject.SetActive(value: true);
            if (transform.gameObject.activeInHierarchy)
            {
            }
            dataModelHandleListenersMap[handle] = serverObjectItemData;
            serverObjectItemData.ItemChanged   += onServerIslandTargetGroupChanged;
            gameObjectIdToTransformMap[islandTargetGroupMmoItem.Id.Id] = transform;
            currentGameMMOItemId = islandTargetGroupMmoItem.Id.Id;
            TotalTargets         = transform.childCount;
            bool isFinalRound = transform.GetSiblingIndex() == transform.parent.childCount - 1;
            CurrentRound++;
            TotalRounds = transform.parent.childCount;
            CoroutineRunner.Start(DelayNextRoundStart(delayBetweenRounds, islandTargetGroupMmoItem, isFinalRound), this, "DelayBetweenCrateCoRounds");
        }
    }