| | |
| | | protected int skillId = 1; |
| | | protected int hurtIndex = 0; |
| | | |
| | | protected int effectId = 0; |
| | | |
| | | protected BattleEffectPlayer effectPlayer; |
| | | |
| | | [MenuItem("Battle/TestSkillAction生成器")] |
| | | public static void ShowWindow() |
| | | { |
| | |
| | | |
| | | skillId = EditorGUILayout.IntField("Skill ID", skillId); |
| | | hurtIndex = EditorGUILayout.IntField("Hurt Index", hurtIndex); |
| | | effectId = EditorGUILayout.IntField("Effect ID", effectId); |
| | | |
| | | |
| | | if (GUILayout.Button("生成并播放 TestSkillAction")) |
| | | { |
| | |
| | | { |
| | | ResetRecordPlayer(); |
| | | } |
| | | |
| | | if (GUILayout.Button("展示特效")) |
| | | { |
| | | |
| | | } |
| | | } |
| | | |
| | | protected void ShowEffect() |
| | | { |
| | | if (effectId <= 0) |
| | | { |
| | | Debug.LogWarning("Effect ID 必须大于0"); |
| | | return; |
| | | } |
| | | |
| | | if (EffectConfig.Get(effectId) == null) |
| | | { |
| | | Debug.LogWarning($"Effect ID {effectId} 在配置表中不存在"); |
| | | return; |
| | | } |
| | | |
| | | HomeWin homeWin = UIManager.Instance.GetUI<HomeWin>(); |
| | | |
| | | effectPlayer = BattleEffectPlayer.Create(effectId, homeWin.transform); |
| | | effectPlayer.Play(); |
| | | } |
| | | |
| | | protected void DestroyEffect() |
| | | { |
| | | if (effectPlayer != null) |
| | | { |
| | | effectPlayer.Stop(); |
| | | GameObject.DestroyImmediate(effectPlayer.gameObject); |
| | | effectPlayer = null; |
| | | } |
| | | } |
| | | |
| | | private void PlayTestSkillAction() |