Esempio n. 1
0
 private void OnEnable()
 {
     if (this.WsToken == -1)
     {
         this.WsToken = WorkScheduler.Register(this, base.transform.position, false);
     }
 }
Esempio n. 2
0
 private void Start()
 {
     if (this.wsToken == -1)
     {
         this.wsToken = WorkScheduler.Register(new WorkScheduler.Task(this.RefreshVisibilityWork), base.transform.position, this.wsToken == -1);
     }
 }
Esempio n. 3
0
 private void WSRegister()
 {
     if (this._wsToken == -1)
     {
         this._wsToken = WorkScheduler.Register(new WsTask(this.RainCheck), base.transform.position, false);
     }
 }
Esempio n. 4
0
 private void OnEnable()
 {
     if (this.WsToken == -1)
     {
         this.WsToken = WorkScheduler.Register(new WorkScheduler.Task(this.RefreshQueue), base.transform.position, false);
     }
 }
Esempio n. 5
0
 private void Awake()
 {
     if (this.WsToken == -1)
     {
         this.WsToken = WorkScheduler.Register(this, base.transform.position, true);
     }
 }
Esempio n. 6
0
 private void WSRegistration()
 {
     if (this.wsToken != -1)
     {
         WorkScheduler.Unregister(this, this.wsToken);
     }
     this.wsToken = WorkScheduler.Register(this, this.position, true);
 }
Esempio n. 7
0
 private void OnEnable()
 {
     base.InvokeRepeating("callSpawnCreatures", UnityEngine.Random.Range(0.1f, 4f), 4f);
     if (this.WsToken == -1)
     {
         this.WsToken = WorkScheduler.Register(this, base.transform.position, false);
     }
 }
 public void WSRegistration(bool doEnableRefresh)
 {
     if (this._wsToken != -1)
     {
         WorkScheduler.Unregister(this, this._wsToken);
     }
     this._wsToken = WorkScheduler.Register(this, this._position, true);
 }
Esempio n. 9
0
 private void OnEnable()
 {
     if (this.billboardId == -1 && this.billboard != null)
     {
         this.billboardId = this.billboard.Register(base.transform.position, base.transform.rotation.y);
     }
     this.wsToken = WorkScheduler.Register(new WorkScheduler.Task(this.RefreshLODs), base.transform.position, false);
     this.RefreshLODs();
 }
Esempio n. 10
0
 private void Start()
 {
     this.Activate();
     if (!this.startEventOnAwake && this.wsToken == -1)
     {
         this.position = base.transform.position;
         this.wsToken  = WorkScheduler.Register(this, base.transform.position, true);
     }
 }
Esempio n. 11
0
 private void WSRegistration()
 {
     if (this.wsToken != -1)
     {
         WorkScheduler.Unregister(new WorkScheduler.Task(this.RefreshVisibilityWork), this.wsToken);
     }
     this.wsToken = WorkScheduler.Register(new WorkScheduler.Task(this.RefreshVisibilityWork), base.transform.position, false);
     this.RefreshVisibility(true);
 }
Esempio n. 12
0
 private void OnEnable()
 {
     if (this._wsToken == -1 && this._scrollingDelay >= 0f)
     {
         this._wsToken = WorkScheduler.Register(new WsTask(this.CheckNextImage), base.transform.position, true);
     }
     if (this._sfxPosition == null)
     {
         this._sfxPosition = base.transform;
     }
 }
Esempio n. 13
0
 public void DefineChunk(Vector3 p1, Vector3 p2, float height, Transform wallRoot, WallChunkArchitect.Additions wallAddition)
 {
     if (this._wsToken < 0)
     {
         this.SpawnQuad(p1, p2, height);
         this._wallRootLOD1GO = this.SpawnLOD(Prefabs.Instance.LogWallExBuiltPrefabLOD1, wallRoot);
         this._wallRootLOD2GO = this.SpawnLOD(Prefabs.Instance.LogWallExBuiltPrefabLOD2, wallRoot);
         this._wallRootGO     = wallRoot.gameObject;
         this._wsToken        = WorkScheduler.Register(new WsTask(this.RefreshVisibility), base.transform.position, false);
         base.gameObject.SetActive(false);
     }
 }
Esempio n. 14
0
 private void WSRegistration(bool doEnableRefresh)
 {
     if (this.wsToken != -1)
     {
         WorkScheduler.Unregister(this, this.wsToken);
     }
     this.wsToken = WorkScheduler.Register(this, this.position, true);
     if (doEnableRefresh)
     {
         this.ThreadedRefresh();
         this.ShouldDoMainThreadRefresh = false;
         this.RefreshVisibility(true);
     }
 }
Esempio n. 15
0
 private void OnEnable()
 {
     if (this.Data == null)
     {
         this.Data                 = new GreebleZonesManager.GZData();
         this.Data._seed           = -1;
         this.Data._instancesState = new byte[this.MaxInstances];
         for (int i = 0; i < this.Data._instancesState.Length; i++)
         {
             this.Data._instancesState[i] = 254;
         }
     }
     this.Data.GZ = this;
     this.wsToken = WorkScheduler.Register(new WorkScheduler.Task(this.UpdateVisibility), base.transform.position, false);
 }
Esempio n. 16
0
 private void Awake()
 {
     this.sceneInfo = Scene.SceneTracker;
     this.thisTr    = base.transform;
     if (GameSetup.IsHardSurvivalMode && this.turtleAmount > 0)
     {
         this.turtleAmount = 1;
     }
     this.layer     = 26;
     this.layerMask = 1 << this.layer;
     if (this.WsToken == -1)
     {
         this.WsToken = WorkScheduler.Register(this, base.transform.position, true);
     }
 }
Esempio n. 17
0
 protected virtual void OnEnable()
 {
     this.CurrentLodTransform = null;
     this._position           = base.transform.position;
     if (this.cb == null)
     {
         if (this.billboard != null)
         {
             this.cb = this.billboard.GetComponent <CustomBillboard>();
         }
         if (this.BillboardId == -1 && this.cb != null)
         {
             this.BillboardId = this.cb.Register(this._position, base.transform.eulerAngles.y);
         }
     }
     else
     {
         this.cb.SetAlive(this.BillboardId, true);
     }
     this.wsToken = WorkScheduler.Register(this, this._position, this.canForceWorkScheduler);
     this.canForceWorkScheduler = false;
 }
Esempio n. 18
0
    private void OnEnable()
    {
        if (this.Data == null)
        {
            this.Data       = new GreebleZonesManager.GZData();
            this.Data._seed = -1;
        }
        int maxInstancesModified = this.MaxInstancesModified;

        if (this.Data._instancesState == null || this.Data._instancesState.Length < maxInstancesModified)
        {
            this.Data._instancesState = new byte[maxInstancesModified];
            for (int i = 0; i < this.Data._instancesState.Length; i++)
            {
                this.Data._instancesState[i] = 254;
            }
        }
        this.Data.GZ  = this;
        this.position = base.transform.position;
        if (this.wsToken == -1)
        {
            this.wsToken = WorkScheduler.Register(this, base.transform.position, false);
        }
    }
Esempio n. 19
0
 private void OwnershipCheckRegistration()
 {
     this._wsToken = WorkScheduler.Register(new WsTask(this.OwnershipCheck), base.transform.position, true);
 }