示例#1
0
    public bool CanEdit()
    {
        if (GameBuilderApplication.IsStandaloneExport)
        {
            return(false);
        }

        if (networkingController.GetIsInMultiplayer())
        {
            VirtualPlayerManager.VirtualPlayerInfo?playerInfo = virtualPlayerManager.GetVirtualPlayerById(playerControlsManager.GetVirtualPlayerId());
            return(playerInfo != null ? playerInfo.Value.canEdit : true);
        }
        else
        {
            return(singlePlayerCanEdit);
        }
    }
示例#2
0
 // Returns my player# or 0 if not yet assigned.
 public int GetMyPlayerNumber()
 {
     VirtualPlayerManager.VirtualPlayerInfo?playerInfo = virtualPlayerManager.GetVirtualPlayerById(virtualPlayerId);
     return(playerInfo != null ? playerInfo.Value.slotNumber : 0);
 }