public CollectState(BaseLootItem lootItem, LootConfig _lootConfig, Transform followPoint) : base(lootItem) { _agent = _lootItem._navMeshAgent; _agent.speed = _lootConfig.playerAttractSpeed; _refreshRate = _lootConfig.refreshRate; _collectRange = _lootConfig.collectRange; _playerAttractDistance = _lootConfig.playerAttractDistance; _followPoint = followPoint; }
public virtual void Init(ILootable origin, Transform follow, LootConfig.LootDef lootDef, LootConfig lootConfig, LootConfig.LootItemDef itemDef) { _autoDestruct = true; _lifeTime = lootConfig.autoDestroyTime; _followPosition = follow; _lootConfig = lootConfig; _lootDef = lootDef; _itemDef = itemDef; RefreshColor(); transform.position = origin.position; transform.position += new Vector3(0, 1f, 0); ChangeItemState(Loot.State.Boom); }
public LootSystem(GameConfig gameConfig, PlayerCombatSystem playerCombatSystem) { _lootConfig = gameConfig.lootConfig; _playerCombatSystem = playerCombatSystem; _dispatcher = Singleton.instance.notificationDispatcher; }