public void FishResult(Message msg) { MessageFishResult result = JsonReader.Deserialize <MessageFishResult>(msg.rawString); BaseHook whichHook = uIDHookMap[result.uid]; whichHook.NailDownFish(result.fishId, result.isCatch, result.lottery); //Move this part into "NailDownFish" //uIDPlayerMap[result.uid].LastDeltaLottery += result.lottery - uIDPlayerMap[result.uid].Lottery; //uIDPlayerMap[result.uid].Lottery = result.lottery; }
public void Shoot(Message msg) { MessageShootInfo info = JsonReader.Deserialize <MessageShootInfo>(msg.rawString); BaseHook whichHook = uIDHookMap[info.uid]; whichHook.LaunchHook(info.angle); uIDPlayerMap[info.uid].Score = info.score; _raiseScoreChangeEvent(whichHook.hookPos, info.score); if (!_bHasLaunched && info.uid == _player.UID) { _raiseFirstLaunchEvent(); _bHasLaunched = true; } }