40 lines
1.2 KiB
C#
40 lines
1.2 KiB
C#
using System.Collections.Generic;
|
|
using Continentis.MainGame.UI;
|
|
using UnityEngine;
|
|
|
|
namespace Continentis.MainGame.Character
|
|
{
|
|
public class CombatCharacterViewBase : MonoBehaviour
|
|
{
|
|
public CharacterBase character;
|
|
|
|
|
|
public GameObject mainView;
|
|
public Animator animator;
|
|
public Dictionary<string, AnimationClip> animationClips;
|
|
|
|
public Collider selector;
|
|
|
|
public Transform numbersPivot;
|
|
public Transform textsPivot;
|
|
public Transform hudPivot;
|
|
public Transform centerPoint => hudPivot;
|
|
public HUDContainer hudContainer;
|
|
|
|
public void InitializeAnimations()
|
|
{
|
|
animationClips = new Dictionary<string, AnimationClip>();
|
|
|
|
if (animator == null || animator.runtimeAnimatorController == null)
|
|
{
|
|
Debug.LogWarning("Animator or RuntimeAnimatorController is null.");
|
|
return;
|
|
}
|
|
|
|
foreach (AnimationClip clip in animator.runtimeAnimatorController.animationClips)
|
|
{
|
|
animationClips.TryAdd(clip.name, clip);
|
|
}
|
|
}
|
|
}
|
|
} |