Ejemplo n.º 1
0
    public void SinkAndDestroy()
    {
        base.CancelInvoke(new Action(this.SinkAndDestroy));
        SpawnGroup[] spawnGroupArray = this.spawngroups;
        for (int i = 0; i < (int)spawnGroupArray.Length; i++)
        {
            spawnGroupArray[i].Clear();
        }
        base.SetFlag(BaseEntity.Flags.Reserved8, true, true, true);
        ScientistJunkpileSpawner scientistJunkpileSpawner = this.npcSpawnGroup;

        if (scientistJunkpileSpawner != null)
        {
            scientistJunkpileSpawner.Clear();
        }
        else
        {
        }
        base.ClientRPC(null, "CLIENT_StartSink");
        Transform vector3 = base.transform;

        vector3.position = vector3.position - new Vector3(0f, 5f, 0f);
        this.isSinking   = true;
        base.Invoke(new Action(this.KillMe), 22f);
    }
Ejemplo n.º 2
0
    public bool SpawnGroupsEmpty()
    {
        bool flag;

        SpawnGroup[] spawnGroupArray = this.spawngroups;
        for (int i = 0; i < (int)spawnGroupArray.Length; i++)
        {
            if (spawnGroupArray[i].currentPopulation > 0)
            {
                return(false);
            }
        }
        ScientistJunkpileSpawner scientistJunkpileSpawner = this.npcSpawnGroup;

        if (scientistJunkpileSpawner != null)
        {
            flag = scientistJunkpileSpawner.currentPopulation > 0;
        }
        else
        {
            flag = false;
        }
        if (flag)
        {
            return(false);
        }
        return(true);
    }
Ejemplo n.º 3
0
    public bool SpawnGroupsEmpty()
    {
        foreach (SpawnGroup spawngroup in this.spawngroups)
        {
            if (spawngroup.currentPopulation > 0)
            {
                return(false);
            }
        }
        ScientistJunkpileSpawner npcSpawnGroup = this.npcSpawnGroup;

        // ISSUE: explicit non-virtual call
        return((npcSpawnGroup != null ? (__nonvirtual(npcSpawnGroup.currentPopulation) > 0 ? 1 : 0) : 0) == 0);
    }
Ejemplo n.º 4
0
    private void SpawnInitial()
    {
        SpawnGroup[] spawnGroupArray = this.spawngroups;
        for (int i = 0; i < (int)spawnGroupArray.Length; i++)
        {
            spawnGroupArray[i].SpawnInitial();
        }
        ScientistJunkpileSpawner scientistJunkpileSpawner = this.npcSpawnGroup;

        if (scientistJunkpileSpawner == null)
        {
            return;
        }
        scientistJunkpileSpawner.SpawnInitial();
    }
Ejemplo n.º 5
0
    public bool SpawnGroupsEmpty()
    {
        SpawnGroup[] array = spawngroups;
        for (int i = 0; i < array.Length; i++)
        {
            if (array[i].currentPopulation > 0)
            {
                return(false);
            }
        }
        ScientistJunkpileSpawner scientistJunkpileSpawner = npcSpawnGroup;

        if ((object)scientistJunkpileSpawner != null && scientistJunkpileSpawner.currentPopulation > 0)
        {
            return(false);
        }
        return(true);
    }