Esempio n. 1
0
        public override void OnActivated()
        {
            WorldChunk worldChunk = null;

            if (GameWorld.Get.ChunkByID(ChunkID, out worldChunk))
            {
                WorldTriggerState worldTriggerState = null;
                if (worldChunk.GetTriggerState(TriggerName, out worldTriggerState))
                {
                    NumTimesTriggeredOnActivated = worldTriggerState.NumTimesTriggered;
                }
            }
            FinishedChecking = true;
        }
Esempio n. 2
0
        public override void CheckIfCompleted()
        {
            WorldChunk worldChunk = null;

            if (GameWorld.Get.ChunkByID(ChunkID, out worldChunk))
            {
                WorldTriggerState worldTriggerState = null;
                if (worldChunk.GetTriggerState(TriggerName, out worldTriggerState))
                {
                    if (IgnorePreviousTriggers)
                    {
                        HasCompleted = worldTriggerState.NumTimesTriggered > NumTimesTriggeredOnActivated;
                    }
                    else
                    {
                        HasCompleted = worldTriggerState.NumTimesTriggered > 0;
                    }
                }
            }
            FinishedChecking = true;
        }