コード例 #1
0
ファイル: HUD_Info_Display.cs プロジェクト: Theerapon/GDSG
    protected void Start()
    {
        if (!ReferenceEquals(gameManager, null))
        {
            gameManager.OnGameStateChanged.AddListener(OnGameStateChangedHandler);
        }

        if (!ReferenceEquals(timeManager, null))
        {
            timeManager.OnDateCalendar.AddListener(HandleOnDateCalendar);
            timeManager.OnTimeCalendar.AddListener(HandleOnTimeCalendar);
            timeManager.OnTimeChange.AddListener(HandlerTimeChange);
            timeManager.NotificationAll();
        }



        if (!ReferenceEquals(characterStatusController, null))
        {
            characterStatusController.OnEnergyUpdated.AddListener(EnergyHandler);
            characterStatusController.OnMotivationUpdated.AddListener(MotivationHandler);
            characterStatusController.OnMoneyUpdated.AddListener(MoneyHandler);
            characterStatusController.ValidateDisplay();
        }
    }