Exemplo n.º 1
0
 public static void addVolume(LandscapeHoleVolume volume)
 {
     if (LandscapeHoleSystem.volumes.Count >= LandscapeHoleSystem.MAX_LANDSCAPE_HOLES)
     {
         return;
     }
     LandscapeHoleSystem.landscapeHoles[LandscapeHoleSystem.volumes.Count] = volume.transform.worldToLocalMatrix;
     LandscapeHoleSystem.volumes.Add(volume);
     LandscapeHoleSystem.sendToGPU();
 }
Exemplo n.º 2
0
        public static void removeVolume(LandscapeHoleVolume volume)
        {
            int num = LandscapeHoleSystem.volumes.IndexOf(volume);

            if (num < 0)
            {
                return;
            }
            LandscapeHoleSystem.volumes.RemoveAt(num);
            LandscapeHoleSystem.landscapeHoles[num] = LandscapeHoleSystem.landscapeHoles[LandscapeHoleSystem.volumes.Count];
            LandscapeHoleSystem.sendToGPU();
        }
Exemplo n.º 3
0
        private static void handleUpdated()
        {
            bool flag = false;

            for (int i = 0; i < LandscapeHoleSystem.volumes.Count; i++)
            {
                LandscapeHoleVolume landscapeHoleVolume = LandscapeHoleSystem.volumes[i];
                if (landscapeHoleVolume.transform.hasChanged)
                {
                    LandscapeHoleSystem.landscapeHoles[i]    = landscapeHoleVolume.transform.worldToLocalMatrix;
                    landscapeHoleVolume.transform.hasChanged = false;
                    flag = true;
                }
            }
            if (flag)
            {
                LandscapeHoleSystem.sendToGPU();
            }
        }
Exemplo n.º 4
0
 // Token: 0x06000E6B RID: 3691 RVA: 0x00063B7C File Offset: 0x00061F7C
 protected void OnDisable()
 {
     LandscapeHoleSystem.removeVolume(this);
     LevelHierarchy.removeItem(this);
 }
Exemplo n.º 5
0
 // Token: 0x06000E6A RID: 3690 RVA: 0x00063B6E File Offset: 0x00061F6E
 protected void OnEnable()
 {
     LevelHierarchy.addItem(this);
     LandscapeHoleSystem.addVolume(this);
 }