/// <summary> /// Display the skill activation dialog for a specific skill /// </summary> /// <param name="uuid">UUID of the skill</param> public void displaySkill(string uuid) { // Notify the dialog is now active Coordinator.Coordinator.NotifyDialogActive(); // Show the dialog box with the switched image core.SetActive(true); description.SwitchImage("SkillDescription/" + uuid); }
/// <summary> /// Initialize this character sprite and skill /// </summary> /// <param name="uuid">UUID of the character that this instance should represent</param> public void InitSprite(string uuid) { if (uuid != null) { // Switch image to that of the desired sprite if given switchableImage.SwitchImage("Character/" + uuid); } else { // Switch off this instance as we don't need them gameObject.SetActive(false); } }
/// <summary> /// Initialize the current enemy /// </summary> /// <param name="spritePath">Path to the desired sprite</param> /// <param name="skillEffective">Array of skill ID that would be effective in killing this enemy</param> /// <param name="minCombo">Minimum combo required to kill this enemy</param> public void InitEnemy(string spritePath, string[] skillEffective, int minCombo) { if (spritePath == "Enemy/ae03f6d8-6ec8-4ec8-8002-9f5cea909e27") { // Special processing code for this special enemy which has 4 possible type int randomType = Core.Orb.GetRandomNumber(1, 5); spritePath += "_" + randomType.ToString(); minimumCombo = randomType; } else { // Load normally minimumCombo = minCombo; } switchImage.SwitchImage(spritePath); acceptedSkill = (string[])skillEffective.Clone(); shieldText.transform.parent.gameObject.SetActive(true); shieldText.text = minimumCombo.ToString(); }
/// <summary> /// Show the end game dialog box /// </summary> /// <param name="finalMessage">Final message before player leave the game</param> public void EndGame(string gameUUID) { description.SwitchImage("Tips/" + gameUUID); core.SetActive(true); Coordinator.Coordinator.NotifyDialogActive(); // Block further input from player }