public void DiscardCard(IntBackchannelType i) { if (c.playerTurn == p && !discarding) { if (i.INT_VALUE <= 0) { return; } StartCoroutine(DiscardCardAnim(i.INT_VALUE, i.logicalPlayerNumber)); } }
public void CardToChallenge(IntBackchannelType slot) { if (slot != null) { if (prevCardVal != slot.INT_VALUE) { Debug.Log("cardtoChallenge" + slot.INT_VALUE); cardToAttackWith = slot.INT_VALUE + 1; } prevCardVal = slot.INT_VALUE; } }
public void StartChallenge(IntBackchannelType newInt) { if (newInt != null) { if (prevStartChall != newInt.INT_VALUE) { var i = newInt.INT_VALUE; if (i < 1) { return; } Debug.Log(i); var victim = int.Parse(i.ToString()[0].ToString()) - 1; var cardToAttackWith = int.Parse(i.ToString()[1].ToString()) + 1; if (!inChallenge) { StartCoroutine(Server.c.Challenge(victim, cardToAttackWith, p, Server.c.pm[victim].playerStack[Server.c.pm[victim].playerStack.Count - 1].type)); } } prevStartChall = newInt.INT_VALUE; } }
void Awake() { backchannelKey = EasyWiFiController.registerControl(EasyWiFiConstants.BACKCHANNELTYPE_INT, controlName); intBackchannel = (IntBackchannelType)EasyWiFiController.controllerDataDictionary[backchannelKey]; }
// Use this for initialization void Awake() { intKey = EasyWiFiController.registerControl(EasyWiFiConstants.CONTROLLERTYPE_INT, controlName); intData = (IntBackchannelType)EasyWiFiController.controllerDataDictionary[intKey]; }