public void Setup(VirtualPlayerManager virtualPlayerManager)
    {
        this.virtualPlayerManager = virtualPlayerManager;
        editToggle.isOn = player.canEdit;
        desiredCanEdit = player.canEdit;
        editToggle.onValueChanged.AddListener(OnCanEditToggled);

        reportButton.onClick.AddListener(() => onReportOrKick?.Invoke(player));
    }
    public static void CommandVpList(CommandTerminal.CommandArg[] args)
    {
        CommandTerminal.HeadlessTerminal.Log("VIRTUAL PLAYERS");
        VirtualPlayerManager instance = GameObject.FindObjectOfType <VirtualPlayerManager>();

        foreach (KeyValuePair <string, VirtualPlayerInfo> pair in instance.virtualPlayers)
        {
            CommandTerminal.HeadlessTerminal.Log(pair.Value.ToString());
        }
    }
Beispiel #3
0
 public Services(
     TerrainManager terrainSystem,
     VoosEngine engine,
     GameUiMain gameUiMain,
     SoundEffectSystem soundEffectSystem,
     ParticleEffectSystem particleEffectSystem,
     VirtualPlayerManager virtualPlayerManager,
     PlayerControlsManager playerControlsManager,
     GameBuilderStage gbStage)
 {
     this.terrainSystem         = terrainSystem;
     this.engine                = engine;
     this.gameUiMain            = gameUiMain;
     this.soundEffectSystem     = soundEffectSystem;
     this.particleEffectSystem  = particleEffectSystem;
     this.virtualPlayerManager  = virtualPlayerManager;
     this.playerControlsManager = playerControlsManager;
     this.gbStage               = gbStage;
 }
Beispiel #4
0
    public void Setup()
    {
        Util.FindIfNotSet(this, ref playerControlsManager);
        Util.FindIfNotSet(this, ref networkingController);
        Util.FindIfNotSet(this, ref engine);

        virtualPlayerManager = engine.GetVirtualPlayerManager();

        multiplayerMenuUI.copyCodeButton.onClick.AddListener(OnCopyClicked);
        multiplayerMenuUI.closeButton.onClick.AddListener(Close);
        multiplayerMenuUI.joinCodeField.text = PhotonNetwork.room.Name;

        multiplayerMenuUI.hideCodeButton.onClick.AddListener(() => showingJoinCode = false);
        multiplayerMenuUI.showCodeButton.onClick.AddListener(() => showingJoinCode = true);
        multiplayerMenuUI.closeButton.onClick.AddListener(Close);

        GameObject reportingObject = Instantiate(playerReportingObject);

        // kickPlayer = reportingObject.GetComponentInChildren<KickPlayer>(true);
        reportPlayer = reportingObject.GetComponentInChildren <ReportPlayer>(true);

        // multiplayerMenuUI.reportPlayerButton.onClick.AddListener(reportPlayer.Open);
        // multiplayerMenuUI.kickPlayerButton.onClick.AddListener(kickPlayer.Open);
    }