Skip to content
This repository has been archived by the owner on Dec 28, 2023. It is now read-only.

VeyronSakai/Unity-Clean-Architecture-RollaBall

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unity-Clean-Architecture-RollaBall

Unityでクリーンアーキテクチャを使ってRoll a Ballを作ってみました。

I made Roll a Ball by using Clean Architecture in Unity.

gif

おおまかなクラス図(Rough Class Diagram)

ClassDiagram

このプロジェクトではTranslator,Repository,DataStore,Structureは使っていません。

This project doesn't use Translator, Repository, DataStore and Structure.

Viewの役割 (Role of View)

シーンに現れるオブジェクトの管理を担当 (management of the objects appearing in the scene)

  • インスペクタビューに表示される情報の管理 (management of the information of the inspector)
  • それらの情報の更新 (update of those information)
  • それらの情報の初期化 (initialization of those information)

Presenterの役割 (Role of Presenter)

Viewの管理を担当 (management of the views)

  • Viewのトリガーをまとめて、IObservableを返すメソッドを各々のトリガーに対して作る。 (making the methods returning IObservable for triggers of the views)
  • (Factoryを用いて)Viewオブジェクトの生成、を扱うメソッドを持つ。 ((By using Factory) having methods to create view objects)
  • 複数のViewインスタンスを管理するためのリストを持つ。 (having the lists which manage multiple views)

UseCaseの役割 (Role of UseCase)

ビジネスロジックを担当 (bisiness logic)

  • IInitializableを継承し、Initializeメソッド内で初期化処理を行う。(initializing in Initialize method)
  • Initialize内でEntityやViewのSubjectやReactivePropertyをSubscribeする。 (subscribing Subject and ReactiveProperty in Initialize method)

Entityの役割 (Role of Entity)

内部データを担当 (managing the internal data)

  • 各オブジェクトの状態をSubjectで管理する (managing the object state in Subject)
  • 内部データをReactivePropertyで管理する (managing the internal data in ReactiveProperty)
  • ReactivePropertyを更新したり、SubjectにOnNextしたりOnCompleteするためのメソッドを持つ (Updating ReactiveProperty and Subject)

使用ライブラリ(Used Library)

  • Unity 2019 1.6f1 (c) Unity Technologies ApS.

  • UniRx 6.2.2 The MIT License (MIT) Copyright (c) 2018 Yoshifumi Kawai.

  • Zenject 7.3.1 Copyright (c) 2010-2019 Modest Tree Media Inc.

参考(Reference)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published