Class ShopHandler
- Namespace
- DefaultNamespace
- Assembly
- Assembly-CSharp.dll
public class ShopHandler : MonoBehaviour
- Inheritance
-
ShopHandler
- Inherited Members
-
- Extension Methods
-
Constructors
ShopHandler()
Fields
addSFX
public SFX_Instance addSFX
Field Value
- SFX_Instance
clickSFX
public SFX_Instance clickSFX
Field Value
- SFX_Instance
droneObject
public GameObject droneObject
Field Value
- GameObject
emptykSFX
public SFX_Instance emptykSFX
Field Value
- SFX_Instance
m_AddedToCartText
public string m_AddedToCartText
Field Value
- string
m_BoughtItemPosition
[SerializeField]
public Transform m_BoughtItemPosition
Field Value
- Transform
m_CategoryItemDic
public Dictionary<ShopItemCategory, List<ShopItem>> m_CategoryItemDic
Field Value
- Dictionary<ShopItemCategory, List<ShopItem>>
m_ItemAddedToCartText
[SerializeField]
public TextMeshProUGUI m_ItemAddedToCartText
Field Value
- TextMeshProUGUI
m_ItemsForSaleDictionary
public Dictionary<byte, ShopItem> m_ItemsForSaleDictionary
Field Value
- Dictionary<byte, ShopItem>
m_OnBuyAction
public Action m_OnBuyAction
Field Value
- Action
m_PhotonView
public PhotonView m_PhotonView
Field Value
- PhotonView
m_RoomStats
public RoomStatsHolder m_RoomStats
Field Value
- RoomStatsHolder
m_ShopView
public ShopViewScreen m_ShopView
Field Value
- ShopViewScreen
public ShoppingCart m_ShoppingCart
Field Value
- ShoppingCart
noMoneySFX
public SFX_Instance noMoneySFX
Field Value
- SFX_Instance
purchaseSFX
public SFX_Instance purchaseSFX
Field Value
- SFX_Instance
Properties
Instance
public static ShopHandler Instance { get; set; }
Property Value
- ShopHandler
NumberOfItemsInShop
public int NumberOfItemsInShop { get; }
Property Value
- int
Methods
AddOnBuyListeners(Action)
public void AddOnBuyListeners(Action a)
Parameters
a Action
Awake()
public void BuyItem(ShoppingCart cart)
Parameters
cart ShoppingCart
BuyItem(int, byte[], float, float, float)
public void BuyItem(int cost, byte[] itemIDs, float x, float y, float z)
Parameters
cost int
itemIDs byte[]
x float
y float
z float
CheckIfBoughtCameraUpgrade(Item)
public void CheckIfBoughtCameraUpgrade(Item item)
Parameters
item Item
ForceUpdate()
public void ForceUpdate()
GetCurrentCartValue()
public int GetCurrentCartValue()
Returns
- int
GetItemsInCart()
public List<ShopItem> GetItemsInCart()
Returns
- List<ShopItem>
GetNumberOfItemsInCart()
public int GetNumberOfItemsInCart()
Returns
- int
InitShop()
InitShopHandler()
public void InitShopHandler()
InitShopScreen()
public void InitShopScreen()
OnAddToCartItemClicked(byte)
public void OnAddToCartItemClicked(byte itemID)
Parameters
itemID byte
OnChangeCategoryClicked(byte)
public void OnChangeCategoryClicked(byte category)
Parameters
category byte
OnClearCartClicked()
public void OnClearCartClicked()
OnOrderCartClicked()
public void OnOrderCartClicked()
RPCA_AddItemToCart(byte)
[PunRPC]
public void RPCA_AddItemToCart(byte itemID)
Parameters
itemID byte
RPCA_ChangeCategory(byte)
[PunRPC]
public void RPCA_ChangeCategory(byte categoryID)
Parameters
categoryID byte
RPCA_ClearCart()
[PunRPC]
public void RPCA_ClearCart()
RPCA_SpawnDrone(byte[])
[PunRPC]
public void RPCA_SpawnDrone(byte[] itemIDs)
Parameters
itemIDs byte[]
RPCM_RequestShop(int)
[PunRPC]
public void RPCM_RequestShop(int playerRequesting)
Parameters
playerRequesting int
RPCM_RequestShopAction(byte, byte)
[PunRPC]
public void RPCM_RequestShopAction(byte shopAction, byte argument)
Parameters
shopAction byte
argument byte
RPCO_UpdateShop(byte, byte[])
[PunRPC]
public void RPCO_UpdateShop(byte category, byte[] itemsInCart)
Parameters
category byte
itemsInCart byte[]
ResetCart(byte[])
public void ResetCart(byte[] itemsInCart)
Parameters
itemsInCart byte[]
ShowItemAddedToCart(float, ShopItem)
public IEnumerator ShowItemAddedToCart(float f, ShopItem item)
Parameters
f float
item ShopItem
Returns
- IEnumerator
SortShopItemsByPrice()
public void SortShopItemsByPrice()
TryGetShopCategoryItems(ShopItemCategory, ref ShopItem[])
public bool TryGetShopCategoryItems(ShopItemCategory categoryIndex, ref ShopItem[] items)
Parameters
categoryIndex ShopItemCategory
items ShopItem[]
Returns
- bool
TryGetShopItem(byte, ref ShopItem)
public bool TryGetShopItem(byte index, ref ShopItem item)
Parameters
index byte
item ShopItem
Returns
- bool