Misc. Improvements
Turrets lead their projectiles Double click to equip/unequip/move Minimum weapon convergence distance
This commit is contained in:
parent
8629b35fd6
commit
922c8ea460
18 changed files with 240 additions and 69 deletions
|
|
@ -144,6 +144,9 @@ public class InventoryPanel : MonoBehaviour
|
|||
ship.SetParent(GameManager.CurrentShip.Parent);
|
||||
GameManager.PlayerShips.Add(ship);
|
||||
GameManager.Credits -= pack.Price(GameManager.ItemManager);
|
||||
GameManager.CurrentShip = ship;
|
||||
GameManager.DockingBay.DockedShip = ship;
|
||||
Display(ship);
|
||||
}, pack.Price(GameManager.ItemManager) < GameManager.Credits
|
||||
)));
|
||||
}
|
||||
|
|
@ -630,6 +633,21 @@ public class InventoryPanel : MonoBehaviour
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool DropItem(ItemInstance item)
|
||||
{
|
||||
if (_displayedEntity != null && item is EquippableItem equippableItem)
|
||||
{
|
||||
return _displayedEntity.TryEquip(equippableItem);
|
||||
}
|
||||
|
||||
if(_displayedCargo != null)
|
||||
{
|
||||
return _displayedCargo.TryStore(item);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public UniRx.IObservable<InventoryEventData> OnClickAsObservable() => _onClick ?? (_onClick = new Subject<InventoryEventData>());
|
||||
public UniRx.IObservable<InventoryEventData> OnBeginDragAsObservable() => _onBeginDrag ?? (_onBeginDrag = new Subject<InventoryEventData>());
|
||||
|
|
|
|||
Loading…
Reference in a new issue