public void LoadCombatInformation(Card.CasterColor color) { int value = InformationController.infoController.GetCurrentVit(color); if ((InformationController.infoController.firstRoom == true && value == 0) || color == Card.CasterColor.Enemy) { currentVit = maxVit; ResetVitText(maxVit); } else { int gotMaxVit = InformationController.infoController.GetMaxVit(color); maxVit = gotMaxVit; int gotCurrentVit = InformationController.infoController.GetCurrentVit(color); currentVit = gotCurrentVit; ResetVitText(gotCurrentVit); int gotStartingAttack = InformationController.infoController.GetStartingAttack(color); startingAttack = gotStartingAttack; SetAttack(startingAttack); ResetAttackText(startingAttack); int gotStartingArmor = InformationController.infoController.GetStartingArmor(color); startingShield = gotStartingArmor; SetCurrentShield(startingShield, false); ResetShieldText(gotStartingArmor); } }
public void ReportDeadChar(Card.CasterColor color) { deadChars.Add(color); if (deadChars.Count >= 3) { TurnController.turnController.StopAllCoroutines(); CanvasController.canvasController.endGameCanvas.enabled = true; CanvasController.canvasController.endGameCanvas.GetComponent <CanvasScaler>().enabled = false; CanvasController.canvasController.endGameCanvas.GetComponent <CanvasScaler>().enabled = true; CanvasController.canvasController.endGameCanvas.transform.GetChild(2).GetComponent <Collider2D>().enabled = true; } }
private GameObject FindCaster(Card.CasterColor casterColorTag) { GameObject[] players = GameObject.FindGameObjectsWithTag("Player"); GameObject caster = players[0]; foreach (GameObject player in players) { if (player.GetComponent <PlayerController>().GetColorTag() == casterColorTag) { caster = player; } } return(caster); }
public int GetCurrentVit(Card.CasterColor color) { if (color == Card.CasterColor.Red) { return(combatInfo.redVit); } if (color == Card.CasterColor.Blue) { return(combatInfo.blueVit); } if (color == Card.CasterColor.Green) { return(combatInfo.greenVit); } return(0); }
public int GetStartingAttack(Card.CasterColor color) { if (color == Card.CasterColor.Red) { return(combatInfo.redAtk); } if (color == Card.CasterColor.Blue) { return(combatInfo.blueAtk); } if (color == Card.CasterColor.Green) { return(combatInfo.greenAtk); } return(0); }
public int GetMaxVit(Card.CasterColor color) { if (color == Card.CasterColor.Red) { return(combatInfo.redMaxVit); } if (color == Card.CasterColor.Blue) { return(combatInfo.blueMaxVit); } if (color == Card.CasterColor.Green) { return(combatInfo.greenMaxVit); } return(0); }
//################################################################################################### //Health Section------------------------------------------------------------------------------------- //################################################################################################### public void LoadCombatInformation(Card.CasterColor color) { Debug.Log(color); int value = InformationController.infoController.GetCurrentVit(color); if ((InformationController.infoController.firstRoom == true && value == 0) || color == Card.CasterColor.Enemy) { currentVit = maxVit; ResetVitText(maxVit); } else { currentVit = value; ResetVitText(value); } }
private GameObject FindClosestCaster(Card.CasterColor casterColorTag, Vector2 location) { GameObject[] players = GameObject.FindGameObjectsWithTag("Player"); GameObject caster = players[0]; foreach (GameObject player in players) { if ((player.GetComponent <PlayerController>().GetColorTag() == casterColorTag || casterColorTag == Card.CasterColor.Gray) && GridController.gridController.GetManhattanDistance(caster.transform.position, location) > GridController.gridController.GetManhattanDistance(player.transform.position, location)) { caster = player; } } return(caster); }
public Color GetCasterColor(Card.CasterColor color) { switch (color) { case Card.CasterColor.Red: return(redCasterColor); case Card.CasterColor.Blue: return(blueCasterColor); case Card.CasterColor.Green: return(greenCasterColor); case Card.CasterColor.Enemy: return(enemyCasterColor); default: return(enemyCasterColor); } }