public void OnDunk(UBasketball ball, bool bGoal) { GetComponent <Animation>().Stop(); GetComponent <Animation>().Play("grabDunk"); m_state = bGoal ? BasketState.eDunkGoal : BasketState.eDunkNoGoal; _UpdateEffect(); if (GameSystem.Instance.mClient.mInputManager.isNGDS) { //设置马达震动 GameSystem.Instance.mClient.mInputManager.sendShock = true; } if (bGoal) { if (onGoal != null) { onGoal(this, ball); } } else { if (onNoGoal != null) { onNoGoal(this, ball); } PlaySoundManager.Instance.PlaySound(MatchSoundEvent.DunkNoGoal); } }
static int SetEffect(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 3); UBasket obj = (UBasket)LuaScriptMgr.GetUnityObjectSelf(L, 1, "UBasket"); BasketState arg0 = (BasketState)LuaScriptMgr.GetNetObject(L, 2, typeof(BasketState)); Object arg1 = (Object)LuaScriptMgr.GetUnityObject(L, 3, typeof(Object)); obj.SetEffect(arg0, arg1); return(0); }
public Basket GetBasketForShopAndOwner(Guid shopGuid, Guid userGuid, BasketState state) { using (var session = _sessionProvider.CreateSession()) { return (session.QueryOver <Basket>() .Where(b => b.State == state && b.BasketShop.UniqueId == shopGuid && b.Owner.UniqueId == userGuid) .Fetch(x => x.BasketProducts).Eager .SingleOrDefault()); } }
public void OnGoal(UBasketball ball) { GetComponent <Animation>().Stop(); GetComponent <Animation>().Play("shootGoal"); m_state = BasketState.eShootGoal; _UpdateEffect(); PlaySoundManager.Instance.PlaySound(MatchSoundEvent.Goal); if (onGoal != null) { onGoal(this, ball); } }
public void OnNoGoal(UBasketball ball) { GetComponent <Animation>().Stop(); GetComponent <Animation>().Play("shootNoGoal"); m_state = BasketState.eShootNoGoal; _UpdateEffect(); PlaySoundManager.Instance.PlaySound(MatchSoundEvent.ShootNoGoal); if (GameSystem.Instance.mClient.mInputManager.isNGDS) { //设置马达震动 GameSystem.Instance.mClient.mInputManager.sendShock = true; } if (onNoGoal != null) { onNoGoal(this, ball); } }
public virtual void RemoveItem(int itemId) { switch(State) { case BasketState.ContainsStuff: { var itemToRemove = Items.FirstOrDefault(item => item.Id == itemId); if (itemToRemove == null) { return; } Items.Remove(itemToRemove); if (Items.Count == 0) { State = BasketState.Empty; } } break; case BasketState.CheckedOut: { throw new InvalidOperationException("Can't remove an item from a basket that's been checked out."); } case BasketState.Empty: { throw new InvalidOperationException("Can't remove an item from an empty basket."); } case BasketState.Archived: { throw new InvalidOperationException("Can't remove an item from a basket that's been archived."); } default: { throw new InvalidOperationException("Unexpected Basket State"); } } }
private void InitObjectState() { keyState = KeyState.InRiver; appleState = AppleState.OnTheTree; blackRoseState = BlackRoseState.InVase; cardState = CardState.OnTable; tissueState = TissueState.OnTable; tableSheetState = TableSheetState.OnTable; micPosition = new Vector2(6.56f, -1f); scissorsPosition = new Vector2(-5.43f, -2.1f); threadPosition = new Vector2(10.86f, 3.095f); needlePosition = new Vector2(9.305f, -1.414999f); globePosition = new Vector2(8.65f, 0.535f); earBudState = EarBudState.InShelf; basketState = BasketState.InHand; diaryState = DiaryState.InShelf; violinCaseState = ViolinCaseState.Locked; currentPasswordViolinCase = "DAFUQ"; ViolinState = ViolinState.Enclosed; if (_inBagItems == null) { _inBagItems = new List <string>(); } }
public Basket ToBasket(BasketId id, int maxSize) => new Basket(id, BasketState.Create(Lines.Select(l => l.ToBasketLine()), maxSize));
public void SetEffect(BasketState state, Object resEffect) { m_stateEffects.Add(new BasketStateEffect(state, resEffect)); }
public BasketStateEffect(BasketState bs, Object resEffect) { targetState = bs; m_resEffect = resEffect; m_goEffect = null; }
public Basket ToBasket(int maxSize) => new Basket(new BasketId(Id), BasketState.Create(Lines.Select(l => l.ToLine()), maxSize));