using System.Collections;
|
using System.Collections.Generic;
|
using UnityEngine;
|
|
using System.Text;
|
|
namespace Snxxz.UI
|
{
|
public class SkillDetails
|
{
|
public static SkillSourceType sourceType { get; private set; }
|
|
public static SkillConfig skillConfig { get; private set; }
|
|
public static int godWeaponType { get; private set; }
|
public static int godWeaponEffectStage { get; private set; }
|
|
public static List<string> skillDescriptions = new List<string>();
|
|
public static string skillSource { get; private set; }
|
|
public static int fightPower { get; private set; }
|
|
static MagicianModel godWeaponModel
|
{
|
get { return ModelCenter.Instance.GetModel<MagicianModel>(); }
|
}
|
|
public static void ShowSkillDetails(int skillId, SkillSourceType type, int fightPower, params string[] infos)
|
{
|
SkillDetails.fightPower = fightPower;
|
sourceType = type;
|
skillConfig = SkillConfig.Get(skillId);
|
skillDescriptions.Clear();
|
switch (type)
|
{
|
case SkillSourceType.GodWeaponSkill:
|
{
|
skillSource = infos[0];
|
skillDescriptions.Add(skillConfig.Description);
|
skillDescriptions.Add(infos[1]);
|
}
|
break;
|
case SkillSourceType.PlayerSkill:
|
{
|
skillSource = skillConfig.SkillName;
|
skillDescriptions.Add(skillConfig.Description);
|
}
|
break;
|
case SkillSourceType.PetSkill:
|
{
|
if (infos.Length <= 0)
|
{
|
skillDescriptions.Add(skillConfig.Description);
|
}
|
else if (infos.Length == 1)
|
{
|
skillDescriptions.Add(infos[0]);
|
}
|
else if (infos.Length == 2)
|
{
|
skillDescriptions.Add(infos[0]);
|
skillDescriptions.Add(infos[1]);
|
|
}
|
else if (infos.Length == 3)
|
{
|
skillDescriptions.Add(skillConfig.Description);
|
skillDescriptions.Add(infos[2]);
|
}
|
}
|
break;
|
case SkillSourceType.ViewHorsePet:
|
{
|
skillDescriptions.Add(infos[0]);
|
skillDescriptions.Add(infos[1]);
|
}
|
break;
|
case SkillSourceType.BlastFurnace:
|
{
|
skillSource = infos[0];
|
skillDescriptions.Add(skillConfig.Description);
|
}
|
break;
|
case SkillSourceType.DogzSkill:
|
{
|
skillDescriptions.Add(skillConfig.Description);
|
}
|
break;
|
case SkillSourceType.JadeDynastySkill:
|
{
|
skillDescriptions.Add(skillConfig.Description);
|
}
|
break;
|
}
|
if (!WindowCenter.Instance.IsOpen<SkillDetailsWin>())
|
{
|
WindowCenter.Instance.Open<SkillDetailsWin>();
|
}
|
}
|
|
public enum SkillSourceType
|
{
|
GodWeaponSkill,
|
PlayerSkill,
|
PetSkill,
|
BlastFurnace,
|
ViewHorsePet,
|
DogzSkill,
|
JadeDynastySkill,
|
}
|
}
|
}
|
|