PartsMgrBase.cs 708 B

123456789101112131415161718192021222324252627282930
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using UnityEngine;
  5. public abstract class PartsMgrBase : MonoBehaviour
  6. {
  7. public bool IsActive { get; protected set; }
  8. public virtual void StartAction()
  9. {
  10. }
  11. public virtual void EndAction()
  12. {
  13. }
  14. protected virtual void Start()
  15. {
  16. if (RhythmAction_Mgr.Instance)
  17. {
  18. RhythmAction_Mgr.Instance.AddMgrParts(this);
  19. }
  20. this.IsActive = (this.m_ActiveDanceType.Any((RhythmAction_Mgr.DanceType e) => e == RhythmAction_Mgr.NowDance) && !DanceMain.KaraokeMode);
  21. }
  22. [SerializeField]
  23. [Header("このダンスの時に動作")]
  24. protected List<RhythmAction_Mgr.DanceType> m_ActiveDanceType = new List<RhythmAction_Mgr.DanceType>();
  25. }