public RpgPlayer(IGameEngine gameEngine, IPlayerInventory playerInventory, IItemSpecialEffect itemSpecialEffect) { _gameEngine = gameEngine; _playerInventory = playerInventory; CarryingCapacity = MaximumCarryingCapacity; _specialEffect = itemSpecialEffect; }
public void Start() { // TODO get the world through some other means (do we really need to?) _world = WorldScript.World; _inventory = new PlayerInventory(); _bank = new MoneyBank { AmountChanged = new Notifee(this, NotificationIds.Money) }; _cursor = GetComponentInChildren <CursorBehavior>().PlayerCursor; AttachmentPoints = AttachmentPointsBehavior.RetrieveFor(Owner); _inventoryList = new DataCollection <IInventoryItemBlueprint>( Enumerable.Concat <IInventoryItemBlueprint>(weaponList, inventoryList).ToArray() ); _currentItem = _inventoryList.Selected.CreateInstance(WorldScript.World, this); SetupDisplay(); }
public RpgPlayerTests() { _engine = Substitute.For <IGameEngine>(); _playerInventory = new PlayerInventory(_engine, MaximumCarryingCapacity); _specialEffect = new ItemSpecialEffect(_engine); }