public void Open( UIPStoreSlot _slot, delVoid _del) { m_CallProc = new CalledProc_PStore( _slot, _del); if( m_CallProc.CheckValid() == false) return; // m_CurSlotIndex = _slot.slotIndex; m_nCurCount = m_nMaxCount = _slot.slotItem.realItem.sItem.nOverlapped; _SetItemText( _slot.slotItem.realItem.item.ItemData); _SetCount( m_nCurCount); _SetIcon( _slot.slotItem.realItem.item); gameObject.SetActiveRecursively( true); }
// IEnumerator RefreshFilledProcess() // { // while( true) // { // yield return null; // // if( m_LockedSlot != null && m_SlotItem != null) // { // if( m_LockedSlot != null) m_LockedSlot.gameObject.SetActiveRecursively( false); // if( m_SlotItem != null) // { // m_SlotItem.gameObject.SetActiveRecursively( true); // m_SlotItem.ShowCoolTime( false); // } // // break; // } // } // } public void SetMovingSlot( UIPStoreSlot _slot) { m_SlotItem = _slot.slotItem; m_Idx = _slot.slotIndex; m_InvenIdx = _slot.InvenIdx; m_TextName = _slot.TextName; m_Gold = _slot.gold; }
public void AttachFocusImg( UIPStoreSlot storageslot ) { // if( null == focusImg ) // { // Debug.LogError("UIStorageDlg::AttachFocusImg() [ null == focusImg ]"); // return; // } // // if( null == storageslot ) // return; // // // focusImg.gameObject.active = true; // Vector3 vec3SlotPos = storageslot.transform.position; // vec3SlotPos.z -= 1.0f; // focusImg.transform.position = vec3SlotPos; }
public CalledProc_PStore(UIPStoreSlot _slot, delVoid _del) { m_InputSlot = _slot; m_delConfirm = _del; }
void PurchaseConfirmed(UIPStoreSlot _slot, int _count) { m_SavedSlotIdx = _slot.slotIndex; m_SavedCount = _count; string title = AsTableManager.Instance.GetTbl_String(126); string content = AsTableManager.Instance.GetTbl_String(407); content = string.Format( content, _slot.TextName + Color.white, _count.ToString(), ( _slot.gold * (ulong)_count).ToString( "#,#0", CultureInfo.InvariantCulture)); string left = AsTableManager.Instance.GetTbl_String(1151); string right = AsTableManager.Instance.GetTbl_String(1152); AsNotify.Instance.MessageBox(title, content, right, left, this, "SendPurchaseInfo", "", AsNotify.MSG_BOX_TYPE.MBT_OKCANCEL); }
void TryBuyPStoreItem(UIPStoreSlot pstoreSlot) { if(pstoreSlot.slotItem.realItem.sItem.nOverlapped == 1) { // m_SavedSlotIdx = pstoreSlot.slotIndex; // m_SavedCount = 1; PurchaseConfirmed(pstoreSlot, 1); } else { m_PStoreQuantityDlg.Open(pstoreSlot, PurchaseConfirmed); } }
void TryRemovePStoreItem(UIPStoreSlot pstoreSlot) { body_CS_PRIVATESHOP_REGISTRATION_ITEM register = new body_CS_PRIVATESHOP_REGISTRATION_ITEM( false, pstoreSlot.InvenIdx, (byte)pstoreSlot.slotIndex, (short)pstoreSlot.slotItem.realItem.sItem.nOverlapped, pstoreSlot.gold); // AsCommonSender.Send(register.ClassToPacketBytes()); AsPStoreManager.Instance.Request_Registraion_Item(register); }
public void GuiInputDClickUp(Ray inputRay) { if( false == _IsUseInput() || m_PStoreGoodsBox.gameObject.active == true) return; // if( null != m_ClickedSlot && m_ClickedSlot.collider.bounds.IntersectRay( inputRay) && m_ClickedSlot.state == UIPStoreSlot.eState.Filled) if( ( null != m_ClickedSlot) && true == m_ClickedSlot.IsIntersect(inputRay) && ( UIPStoreSlot.eState.Filled == m_ClickedSlot.state)) { switch(AsPStoreManager.Instance.storeState) { case ePStoreState.User_Standby: TryRemovePStoreItem(m_ClickedSlot); break; case ePStoreState.Another_Opened: TryBuyPStoreItem(m_ClickedSlot); break; } m_ClickedSlot.ReleaseSelection(); m_ClickedSlot = null; } }
public void GuiInputDown( Ray inputRay) { if( false == _IsUseInput()) return; m_fItemMoveTime = 0.0f; foreach( UIPStoreSlot slot in slots) { slot.ReleaseSelection(); // if( null != slot.slotItem && true == slot.collider.bounds.IntersectRay( inputRay)) if( ( null != slot.slotItem) && ( true == slot.IsIntersect(inputRay))) { AsSoundManager.Instance.PlaySound( "Sound/Interface/S6002_EFF_Button", Vector3.zero, false); m_ClickedSlot = slot; m_ClickedSlot.ActiveSelection(); } } }