2025-02-02 08:34:54 -05:00
|
|
|
using System;
|
2025-01-26 21:10:16 -05:00
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using Unity.Mathematics;
|
|
|
|
|
using UnityEngine;
|
2025-02-08 02:31:39 -05:00
|
|
|
using UnityEngine.Serialization;
|
2025-01-26 21:10:16 -05:00
|
|
|
|
|
|
|
|
namespace Ichni.RhythmGame
|
|
|
|
|
{
|
2025-02-08 02:31:39 -05:00
|
|
|
public abstract class AnimationBase : GameElement, IHaveTimeDurationSubmodule
|
2025-01-26 21:10:16 -05:00
|
|
|
{
|
2025-02-08 02:31:39 -05:00
|
|
|
public GameElement animatedObject;
|
2025-01-26 21:10:16 -05:00
|
|
|
public FlexibleReturnType animationReturnType;
|
|
|
|
|
|
2025-02-08 02:31:39 -05:00
|
|
|
public TimeDurationSubmodule timeDurationSubmodule { get; set; }
|
|
|
|
|
|
|
|
|
|
protected override void SetDefaultSubmodules()
|
2025-01-26 21:10:16 -05:00
|
|
|
{
|
2025-02-02 08:34:54 -05:00
|
|
|
timeDurationSubmodule = new TimeDurationSubmodule(this);
|
2025-02-08 02:31:39 -05:00
|
|
|
submoduleList.Add(timeDurationSubmodule);
|
2025-01-29 23:49:18 -05:00
|
|
|
}
|
|
|
|
|
|
2025-01-27 22:11:24 -05:00
|
|
|
protected abstract void UpdateAnimation(float songTime);
|
2025-02-08 02:31:39 -05:00
|
|
|
|
2025-01-27 22:11:24 -05:00
|
|
|
protected virtual void Update()
|
|
|
|
|
{
|
2025-02-14 22:04:21 -05:00
|
|
|
if (timeDurationSubmodule.CheckTimeInDuration(EditorManager.instance.songInformation.songTime))
|
2025-01-27 22:11:24 -05:00
|
|
|
{
|
2025-02-14 22:04:21 -05:00
|
|
|
UpdateAnimation(EditorManager.instance.songInformation.songTime);
|
2025-01-27 22:11:24 -05:00
|
|
|
}
|
|
|
|
|
}
|
2025-01-26 21:10:16 -05:00
|
|
|
}
|
2025-02-08 02:31:39 -05:00
|
|
|
|
|
|
|
|
namespace Beatmap
|
|
|
|
|
{
|
|
|
|
|
public abstract class AnimationBase_BM : GameElement_BM
|
|
|
|
|
{
|
|
|
|
|
public AnimationBase_BM()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public AnimationBase_BM(string elementName, Guid elementGuid, List<string> tags,
|
|
|
|
|
GameElement_BM attachedElement) : base(elementName, elementGuid, tags, attachedElement)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
2025-01-26 21:10:16 -05:00
|
|
|
}
|