public override void Initialize() { Player player = manager.GetSelfPlayer(); startSquare = player.Information.CurrentSquare; targetSquare = startSquare; usedCardInformation = player.GetPlot(); squareTarget.Initialize(player.transform, MoveAim, EndMove); UIManager.Instance.SwitchUI(PhaseEnum.RangePhase, true); }
/// <summary> /// playerID2の方がplayerID1より行動順が早いときtrueを返す /// 双方の選んだカードのタイプを比較する。 /// どちらも同じときcharaのイニシアティブで判断する /// </summary> /// <param name="playerID1"></param> /// <param name="playerID2"></param> /// <returns></returns> bool JudgeOrder(int playerID1, int playerID2) { CardInfomation c1 = players[playerID1].Information.GetPlot(CurrentSegment); CardInfomation c2 = players[playerID2].Information.GetPlot(CurrentSegment); Character chara1 = players[playerID1].Information.Chara; Character chara2 = players[playerID2].Information.Chara; return(c1.Type > c2.Type || (c1.Type == c2.Type && chara1.Initiative < chara2.Initiative)); }
public void DecideTarget() { int dis = board.GetManhattanDistance(startSquare, targetSquare); if (dis > usedCardInformation.maxRange || dis < usedCardInformation.minRange) { Debug.Log("Over Range!"); return; } usedCardInformation = null; manager.EndPhase(this); //player.EndTurn(); Debug.Log("You attack this square!!"); }
public TestCharacter() { Hp = 3; Initiative = 3; Mobility = 1; DefensePower = 0; //防御可能回数 Imagination = 3; AssaultPower = 0; //突進ダメージ AssaultCounterPower = 0; //被突進ダメージ EquipmentsMask = 0; cards = new CardInfomation[Hp]; MakeCard(); }
public void DecideTarget() { int dis = board.GetManhattanDistance(startSquare, targetSquare); if (dis > usedCardInformation.maxRange || dis < usedCardInformation.minRange) { Debug.Log("Over Range!"); return; } cameraManager.SetPosition(transform); uiManager.SwitchUI(PhaseEnum.RangePhase, false); usedCardInformation = null; process = null; Debug.Log("You attack this square!!"); }
public override void Initialize() { //カードの情報をもらう Player player = manager.GetSelfPlayer(); CardInfomation tmp = player.GetPlot(); mobility = tmp.Power; numberOfMoves = 0; directionUI.SetActive(true); currentSquare = player.Information.CurrentSquare; board.GetSquare(currentSquare).PlayerExit(); UIManager.Instance.SwitchUI(PhaseEnum.MovePhase, true); squareTarget.Initialize(player.transform, SetDirection, EndMove); result[1] = 0; result[2] = 0; result[3] = 0; }
void CalculateRangeDamage(Board board, Player[] players, int actingPlayerID, int place, CardInfomation cardInfo, byte[] reacts) { Player actingPlayer = players[actingPlayerID]; for (int i = 0; i < players.Length; i++) { if (i == actingPlayerID) { continue; } Player target = players[i]; int delta = board.GetManhattanDistance(place, target.Information.CurrentSquare); if (delta > cardInfo.maxRange || delta < cardInfo.minRange) { continue; } //キャラアニメーションにダメージを渡すことでダメージ量を表示させる } }
void MakeCard() { cards[0] = new CardInfomation(null, 1, 1, 0, 3, "moveTest", 0, CardType.Move); cards[1] = new CardInfomation(null, 1, 3, 2, 3, "rangeTest", 1, CardType.Range); cards[2] = new CardInfomation(null, 1, 1, 0, 6, "meleeTest", 2, CardType.Melee); }
/// <summary> /// RangePhaseの実装セット /// </summary> #region RangePhase public void SetUsedCard(int segment) { usedCardInformation = actions[segment].CardInfo; }
public void SetCardInfo(CardInfomation cardInfomation) { CardInfo = cardInfomation; cardName.text = cardInfomation.Name; }
public void SetCardInfo(int num, CardInfomation info) { handObjects[num].SetCardInfo(info); }