示例#1
0
    private void Awake()
    {
        //load playerData or set default values
        PlayerDataController.Initialize();
        PlayerDataController.Instance.LoadData();

        GameData.Initialize();
        SoundManager.Initialize();
    }
示例#2
0
    private void Awake()
    {
        if (Instance == null)
        {
            Instance = this;
        }
        IsGameEnded = false;
        WinScreen.SetActive(false);
        LoseScreen.SetActive(false);
        //StartCoroutine(CameraShaking(0));
#if UNITY_EDITOR
        SoundManager.Initialize();
        GameData.Initialize();
        if (PlayerDataController.Instance == null)
        {
            PlayerDataController.Initialize();
        }
#endif
    }
示例#3
0
    // 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);
    }