コード例 #1
0
ファイル: GameController.cs プロジェクト: RevanVI/LifeGame
    // Start is called before the first frame update
    void Start()
    {
        PlayerDataController.Initialize();

        Years = 0;
        LifeHandlerRef.Initialize();
        OnStep = new UnityEvent();

        GameUIRef.OnModeToggleClick.AddListener(ChangeGameMode);
        GameUIRef.OnStepButtonClick.AddListener(RequestNextStep);
        InputControllerRef.OnTap.AddListener(ProcessTap);
        InputControllerRef.OnSwipe.AddListener(ProcessSwipe);
        InputControllerRef.OnDrag.AddListener(ProcessDrag);
        NodeInfo.OnButtonsClick.AddListener(ProcessNodeInfoPanelButtonClick);
        NodeInfo.gameObject.SetActive(false);
        PowerBarRef.Initialize(_maxPower);
        OnStep.AddListener(NodeInfo.UpdateInfo);
        ControlPanelRef.OnSpawnButtonClick.AddListener(ProcessSpawnModeButtonClick);
        ControlPanelRef.OnRemoveButtonClick.AddListener(ProcessRemoveModeButtonClick);
    }