
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
@umm/cafu_timeline
Advanced tools
$ npm install github:umm-projects/cafu_timeline
using System;
using CAFU.Timeline.Domain.Model;
using CAFU.Timeline.Presentation.View;
namespace MainProject.SubProject.Presentation.View.SampleScene {
public enum TimelineName {
Hoge,
Fuga,
Piyo,
Foo_Bar,
}
[Serializable]
public class TimelineInformation : TimelineInformation<TimelineName> {}
public class Timeline : TimelineView<TimelineName, TimelineInformation> {
public override ITimelinePresenter<TEnum, TTimelineInformation> GetTimelinePresenter() {
// IView に対する extension methods を生やしてある場合は return this.GetPresenter(); とかでもOK
return SampleSceneViewController.Instance.Presenter;
}
}
}
CAFU.Timeline.Presentation.View.TimelineView<TEnum, TTimelineInformation> を作ってあるので、それを継承します。ITimelinePresenter<TEnum, TTimelineInformation> GetTimelinePresenter() を要求されるので、 ITimelinePresenter を実装している Presenter のインスタンスを返します。Timeline.cs として保存します。
Controller
Timeline
Toggle
Show
ShowHoge
ShowFuga
Hide
HideHoge
HideFuga
TimelineName.Toggle: /Timeline/ToggleTimelineName.Toggle_Show_ShowHoge: /Timeline/Toggle/Show/ShowHogeTimelineName.Hide: /Timeline/Toggle/HideCAFU.Timeline.Domain.Model.TimelineInformation<TEnum> クラスを拡張したクラスを作ります。
System.Serializable 属性を付けます。using CAFU.Core.Domain;
using CAFU.Core.Presentation;
using CAFU.Timeline.Domain.UseCase;
using CAFU.Timeline.Presentation.Presenter;
using MainProject.SubProject.Presentation.View.SampleScene;
namespace MainProject.SubProject.Presentation.Presenter {
public class SamplePresenter : ITimelinePresenter<TimelineName, TimelineInformation>, IPresenterBuilder {
public TimelineUseCase<TimelineName, TimelineInformation> TimelineUseCase { get; private set; }
public void Build() {
this.TimelineUseCase = UseCaseFactory.CreateInstance<TimelineUseCase<TimelineName, TimelineInformation>>();
}
}
}
ITimelinePresenter<TEnum, TTimelineInformation> を実装します。
public TimelineUseCase<TimelineName> TimelineUseCase { get; } を実装します。Build() メソッド内で初期化すると良いでしょう。Timeline GameObject を作成し、上記で作った View クラスを AddComponent します。Timeline GameObject の子要素として、シーン内で再生する Timeline (PlayableDirector) を複数登録します。PlayableDirector GetPlayableDirector(TEnum) が生やしてあるので、取得した PlayableDirector のメソッドを叩いてください。Timeline/ 以下の GameObject を探しに行きます。
void SetGenericBindingBy***() が生やしてあります。
| TrackAsset | 型 |
|---|---|
| AnimationTrack | Animator |
| AudioTrack | AudioSource |
| ActivationTrack | GameObject |
SampleViewController.Instance.Presenter.SetGenericBindingByPlayableAssetName(TimelineName.Hoge, "FadeIn", this.GetComponent<Animator>());
void SetReferenceValueByPlayableAssetName() が生やしてあります。| PlayableAsset | 型 |
|---|---|
| ControlPlayableAsset | GameObject |
SampleViewController.Instance.Presenter.SetReferenceValueByPlayableAssetName(TimelineName.Hoge, "SomeReference", this.gameObject);
Copyright (c) 2017 Tetsuya Mori
Released under the MIT license, see LICENSE.txt
FAQs
Timeline UseCase for CAFU
We found that @umm/cafu_timeline demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.