Exemple #1
0
        private static void SpawnBox(DungeonBoostType type, Player player, Vector3 position)
        {
            if (type != DungeonBoostType.None)
            {
                DungeonBoost.DungeonBoostProperties properties2 = new DungeonBoost.DungeonBoostProperties();
                properties2.Type                  = type;
                properties2.ActivationType        = DungeonBoostActivationType.DestructibleHit;
                properties2.DoDestroyOnActivation = true;
                properties2.Radius                = ConfigDungeonBoosts.BOX_RADIUS;
                DungeonBoost.DungeonBoostProperties props = properties2;
                switch (type)
                {
                case DungeonBoostType.BuffBox:
                case DungeonBoostType.ExplosiveBox:
                    props.BuffPerkType = LangUtil.GetRandomValueFromList <PerkType>(ConfigPerks.DUNGEON_BOOST_PERK_POOLS[type]);
                    break;

                case DungeonBoostType.ResourceBox:
                    props.ShopEntryId = CmdRollDungeonBoostResourceBoxLootTable.ExecuteStatic(App.Binder.ConfigLootTables.DungeonBoostResourceBoxLootTable, player);
                    break;
                }
                DungeonBoost dungeonBoost = GameLogic.Binder.DungeonBoostPool.getObject();
                dungeonBoost.gameObject.SetActive(true);
                dungeonBoost.initialize(position, props);
                GameLogic.Binder.EventBus.DungeonBoostSpawned(dungeonBoost);
            }
        }
Exemple #2
0
 public DungeonBoostProperties(DungeonBoost.DungeonBoostProperties another)
 {
     this.ActivationType        = another.ActivationType;
     this.BuffPerkType          = another.BuffPerkType;
     this.DoDestroyOnActivation = another.DoDestroyOnActivation;
     this.Radius      = another.Radius;
     this.ShopEntryId = another.ShopEntryId;
     this.Type        = another.Type;
 }