コード例 #1
0
        /// <summary>
        /// Process non-tree layer objects
        /// loot, nodes, supply drops, etc
        /// </summary>
        /// <param name="gameObject"></param>
        private void CollectGameObject(GameObjectBase gameObject)
        {
            /* Military Crates */
            if (_isCollectingMilitaryCrates && gameObject.IsMilitaryCrate())
            {
                MilitaryCrates.AddOrUpdate(gameObject.InitialAddress, gameObject, (old, newer) => gameObject);
                return;
            }

            /* Military Crates */
            if (_isCollectingWoodenLootCrates && gameObject.IsNormalCrate())
            {
                WoodenLootCrates.AddOrUpdate(gameObject.InitialAddress, gameObject, (old, newer) => gameObject);
                return;
            }

            /* Sulfur Objects */
            if (_isCollectingSulfurNodes && gameObject.IsSulfurOre())
            {
                SulfurNodes.AddOrUpdate(gameObject.InitialAddress, gameObject, (old, newer) => gameObject);
                return;
            }

            /* Metal ore entities */
            if (_isCollectingMetalNodes && gameObject.IsMetalOre())
            {
                MetalNodes.AddOrUpdate(gameObject.InitialAddress, gameObject, (old, newer) => gameObject);
                return;
            }

            /* Stone ore entities */
            if (_isCollectingStoneNodes && gameObject.IsStoneOre())
            {
                StoneNodes.AddOrUpdate(gameObject.InitialAddress, gameObject, (old, newer) => gameObject);
                return;
            }

            /* Hemp Collectables */
            if (_isCollectingHempNodes && gameObject.IsHempNode())
            {
                HempNodes.AddOrUpdate(gameObject.InitialAddress, gameObject, (old, newer) => gameObject);
                return;
            }

            /* Tool Cupboards */
            if (_isCollectingToolCupboards && gameObject.IsToolCupboard())
            {
                ToolCupboards.AddOrUpdate(gameObject.InitialAddress, gameObject, (old, newer) => gameObject);
                return;
            }

            /* Storage Containers */
            if (_isCollectingStorageContainers && gameObject.IsStorageContainer())
            {
                StorageContainers.AddOrUpdate(gameObject.InitialAddress, gameObject, (old, newer) => gameObject);
                return;
            }
        }
コード例 #2
0
        /// <summary>
        /// Stop or start collecting stone nodes
        /// </summary>
        public void StopOrStartCollectingMilitaryCrates(bool stopStart)
        {
            _isCollectingMilitaryCrates = stopStart;

            if (stopStart == false)
            {
                MilitaryCrates.Clear();
            }
        }