-
-
Save zonaryFUND/ae98f07cbe75ead3f41e6d30e04f23f9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BattleMain: MonoBehaviour { | |
public event EventHandler<List<UnitInfo>> UnitInfoUpdateHandler; | |
public SomeBattleProcess() { | |
// ~~~~何らかの戦闘処理でUnitInfoのリストが更新 | |
UnitInfoUpdateHandler(this, this.unitInfoList); | |
} | |
} | |
//////////////////////////////// | |
public class MapViewManager: MonoBehaviour { | |
[SerializeField] | |
BattleMain main; | |
void Start() { | |
main.UnitInfoUpdateHandler += this.OnUnitListUpdated; | |
} | |
void OnUnitListUpdated(object sender, List<UnitInfo> unitInfoList) { | |
// Viewの更新処理 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment