Beispiel #1
0
    private void CreatePlayerUi()
    {
        playerUiController = GameObject.Instantiate(playerUiControllerPrefab);
        RectTransform playerUiAreaTransform = playerUiArea.GetComponent <RectTransform>();

        playerUiController.GetComponent <RectTransform>().SetParent(playerUiAreaTransform);
        playerUiController.Init();
    }
Beispiel #2
0
    public void Init(PlayerProfile playerProfile, string voiceName, MicProfile micProfile)
    {
        this.PlayerProfile      = playerProfile;
        this.MicProfile         = micProfile;
        this.Voice              = GetVoice(songMeta, voiceName);
        this.playerUiController = Instantiate(playerUiControllerPrefab, playerUiArea.transform);
        this.childrenInjector   = CreateChildrenInjectorWithAdditionalBindings();

        // Inject all
        foreach (INeedInjection childThatNeedsInjection in GetComponentsInChildren <INeedInjection>())
        {
            childrenInjector.Inject(childThatNeedsInjection);
        }
        childrenInjector.Inject(playerUiController);

        // Init instances
        playerUiController.Init(PlayerProfile, MicProfile);
        PlayerScoreController.Init(Voice);
    }
Beispiel #3
0
 private void CreatePlayerUi()
 {
     playerUiController = Instantiate(playerUiControllerPrefab, playerUiArea.transform);
     playerUiController.Init(PlayerProfile, MicProfile);
 }
Beispiel #4
0
 private void Init()
 {
     player.Init(playerUiController, visionController);
     playerUiController.Init(player);
     visionController.Init(player, mapController);
 }