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);
    }
Example #2
0
 public void SinkAndDestroy()
 {
     CancelInvoke(SinkAndDestroy);
     SpawnGroup[] array = spawngroups;
     for (int i = 0; i < array.Length; i++)
     {
         array[i].Clear();
     }
     SetFlag(Flags.Reserved8, true, true);
     npcSpawnGroup?.Clear();
     ClientRPC(null, "CLIENT_StartSink");
     base.transform.position -= new Vector3(0f, 5f, 0f);
     isSinking = true;
     Invoke(KillMe, 22f);
 }