public static async Task GetTeamSettings(HttpClient client, TeamSettings teamSettings, string teamId) { string url = Configuration.CurrentConfig.TeamVSTSUri + ((teamId != null) ? $"/DefaultCollection/" + Configuration.CurrentConfig.TeamProjectName + "/_apis/work/teamsettings?team={teamId}" : "/DefaultCollection/" + Configuration.CurrentConfig.TeamProjectName + "/_apis/work/teamsettings"); HttpResponseMessage response = await client.GetAsync(new Uri(url)); if (CheckHttpResponse(response)) { return; } string responseString = await response.Content.ReadAsStringAsync(); JObject responseParsed = JObject.Parse(responseString); teamSettings.Iteration = responseParsed["defaultIteration"]["name"].ToObject <string>(); teamSettings.IterationPath = "OS" + responseParsed["defaultIteration"]["path"].ToObject <string>(); var currentIterationUrl = responseParsed["defaultIteration"]["url"].ToObject <string>(); teamSettings.ProjectUrl = responseParsed["_links"]["project"]["href"].ToObject <string>(); await ProcessIteration(client, currentIterationUrl, teamSettings); }
public StandardResponseViewModel BugsBehaviorRESTCall(string project, TeamSettings vm) { var response = new StandardResponseViewModel(); using (var client = new HttpClient()) { //client.BaseAddress = new Uri(_apiurl); client.DefaultRequestHeaders.Accept.Clear(); client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", _login); var patchValue = new StringContent(JsonConvert.SerializeObject(vm), Encoding.UTF8, "application/json"); var method = new HttpMethod("PATCH"); var request = new HttpRequestMessage(method, _apiurl + project + "/_apis/work/teamsettings?api-version=2.0-preview.1") { Content = patchValue, }; var result = client.SendAsync(request).Result; if (result.IsSuccessStatusCode) { response.Success = true; } else { response.Success = false; response.Message = "Error during rest call: " + result.ReasonPhrase; } return(response); } }
public Team(TeamSettings ts) { this.name = ts.getName(); this.id = ts.getId(); this.pieces = ts.getPieces(); this.moves = new List <Move>(); this.transformMove = ts.getTransform(); }
public static GameSettings defaultSettings() { List <TeamSettings> tsList = new List <TeamSettings>(); tsList.Add(TeamSettings.defaultTeam1()); tsList.Add(TeamSettings.defaultTeam2()); return(new GameSettings(new MoveSettings(), tsList, 5, 5, 1)); }
public void RpcSetupPlayer(int connectionID, TeamSettings team) { Debug.Log("RpcSetupPlayer"); //Call fuction for setup team, conneciton and tag SetupPlayer(connectionID, team); //Call fuction to spawn cam InstatiatePlayerCam(); }
public void SetupPlayer(int connectionID, TeamSettings team) { Debug.Log("Set up Player (team:" + team.name + ", conn: " + connectionID + ", tag: " + tag); myTeam = team; connID = connectionID; //gameObject.tag = myTeam.name; }
public void CL_Work_TeamSettings_UpdateTeamSettings_Success() { // arrange TeamSettings teamSettings = new TeamSettings(_configuration); // act var result = teamSettings.UpdateTeamSettings(_configuration.Project); //assert Assert.IsNotNull(result); }
/// <summary> /// Initializes a new instance of the <see cref="GameVariant"/> class with default values. /// </summary> public GameVariant() { _metadata = new ContentMetadata(); _general = new GeneralSettings(); _prototype = new PrototypeSettings(); _respawn = new RespawnSettings(); _social = new SocialSettings(); _mapOverrides = new MapOverrides(); _requisition = new RequisitionSettings(); _teams = new TeamSettings(); _loadouts = new LoadoutSettings(); _ordnance = new OrdnanceSettings(); }
public void Work_TeamSettings_UpdateTeamSettings_Success() { // arrange TeamSettings request = new TeamSettings(_configuration); // act GetTeamSettingsResponse.Settings settingsResponse = request.UpdateTeamSettings(_configuration.Project); // assert Assert.AreEqual(HttpStatusCode.OK, settingsResponse.HttpStatusCode); request = null; }
void Update() { bool revive = false; foreach (var player in AllPlayersModular.Items) { if (player.Control != null) { if (player.Control.GetButtonDown("Start")) { revive = true; break; } } } if (revive) { // Player stuff foreach (var player in DeadPlayersModular.Items.ToList()) { //player.gameObject.DestroyTemporaries(); // this doesn't really do anything yet, right? player.GetComponent <Health>().Revive(); } // Level stuff foreach (var gate in CurrentLevel.Gates) { if (gate != null) { gate.Close(); } } if (NextLevel) { foreach (var gate in NextLevel.Gates) { if (gate != null) { gate.Close(); } } NextLevel.gameObject.SetActive(false); NextLevelIndex = -1; } WinningTeam = null; GameGUI.Instance.Hide(); } }
private TeamSettings CreateTargetTeamSettings(TeamConfiguration sourceTCfU) { /////////////////////////////////////////////////// TeamSettings newTeamSettings = sourceTCfU.TeamSettings; newTeamSettings.BacklogIterationPath = newTeamSettings.BacklogIterationPath.Replace(me.Source.Config.Project, me.Target.Config.Project); List<string> newIterationPaths = new List<string>(); foreach (var ip in newTeamSettings.IterationPaths) { newIterationPaths.Add(ip.Replace(me.Source.Config.Project, me.Target.Config.Project)); } newTeamSettings.IterationPaths = newIterationPaths.ToArray(); /////////////////////////////////////////////////// return newTeamSettings; }
public TeamBase(int?pId, List <Reference> pAdminRoles, int?pAdminRolesCount, string pDescription, string pEmail, bool pIsInternal, string pName, Reference pOwner, int?pOwnerId, List <Reference> pScopes, int?pScopesCount, TeamSettings pSettings, string pSlack, List <Reference> pUpdates, int?pUpdatesCount, List <Reference> pUsers, int?pUsersCount) : this(DocConvert.ToInt(pId)) { AdminRoles = pAdminRoles; AdminRolesCount = pAdminRolesCount; Description = pDescription; Email = pEmail; IsInternal = pIsInternal; Name = pName; Owner = pOwner; OwnerId = pOwnerId; Scopes = pScopes; ScopesCount = pScopesCount; Settings = pSettings; Slack = pSlack; Updates = pUpdates; UpdatesCount = pUpdatesCount; Users = pUsers; UsersCount = pUsersCount; }
public void SetPlanningIterations() { TfsTeamProjectCollection tpc = TfsConnect(); ICommonStructureService4 css = tpc.GetService <ICommonStructureService4>(); ProjectInfo project = css.GetProjectFromName(TeamProject); TeamSettingsConfigurationService teamConfigService = tpc.GetService <TeamSettingsConfigurationService>(); var teamConfigs = teamConfigService.GetTeamConfigurationsForUser(new string[] { project.Uri }); foreach (TeamConfiguration teamConfig in teamConfigs) { if (teamConfig.IsDefaultTeam) { TeamSettings settings = teamConfig.TeamSettings; settings.IterationPaths = PlanningSprints.ToArray(); teamConfigService.SetTeamSettings(teamConfig.TeamId, settings); Console.Write(new string('.', PlanningSprints.Count)); } } Console.WriteLine(string.Format(" ({0} iterations)", PlanningSprints.Count)); }
public TeamSettings GetTeam(int connectionID) { Debug.Log("GetTeam: " + connectionID); TeamSettings T = null; if (connectionID == 0) { Debug.Log("connectionID == 0"); if (VariablesRealTime.team == "Bear") { Debug.Log("VariablesRealtime equals: " + Up.name); T = Up; } if (VariablesRealTime.team == "Cat") { Debug.Log("VariablesRealtime equals: " + Down.name); T = Down; } } else { Debug.Log("connectionID != 0"); if (connectionID % 2 == 0) { T = Down; } else { T = Up; } } return(T); }
public async Task <string> CreateTeamAsyn( string accessToken, string groupId) { // This might need Retries. string endpoint = GraphRootUri + $"groups/{groupId}/team"; TeamSettings teamInfo = new TeamSettings() { funSettings = new Funsettings() { allowGiphy = true, giphyContentRating = "strict" }, messagingSettings = new Messagingsettings() { allowUserEditMessages = true, allowUserDeleteMessages = true }, memberSettings = new Membersettings() { allowCreateUpdateChannels = true } }; return(await PutRequest(accessToken, endpoint, JsonConvert.SerializeObject(teamInfo))); }
public Team(int?pId, List <Reference> pAdminRoles, int?pAdminRolesCount, string pDescription, string pEmail, bool pIsInternal, string pName, Reference pOwner, int?pOwnerId, List <Reference> pScopes, int?pScopesCount, TeamSettings pSettings, string pSlack, List <Reference> pUpdates, int?pUpdatesCount, List <Reference> pUsers, int?pUsersCount) : base(pId, pAdminRoles, pAdminRolesCount, pDescription, pEmail, pIsInternal, pName, pOwner, pOwnerId, pScopes, pScopesCount, pSettings, pSlack, pUpdates, pUpdatesCount, pUsers, pUsersCount) { }
public void Deconstruct(out List <Reference> pAdminRoles, out int?pAdminRolesCount, out string pDescription, out string pEmail, out bool pIsInternal, out string pName, out Reference pOwner, out int?pOwnerId, out List <Reference> pScopes, out int?pScopesCount, out TeamSettings pSettings, out string pSlack, out List <Reference> pUpdates, out int?pUpdatesCount, out List <Reference> pUsers, out int?pUsersCount) { pAdminRoles = AdminRoles; pAdminRolesCount = AdminRolesCount; pDescription = Description; pEmail = Email; pIsInternal = IsInternal; pName = Name; pOwner = Owner; pOwnerId = OwnerId; pScopes = Scopes; pScopesCount = ScopesCount; pSettings = Settings; pSlack = Slack; pUpdates = Updates; pUpdatesCount = UpdatesCount; pUsers = Users; pUsersCount = UsersCount; }
public override void Start() { oTS = this.game.settings.Global.Team; sm.SetFirstState(new MainUnitState(sm, this)); base.Start(); }
public void SetAwayKit(TeamSettings t) { Away.SetKitColors(t.GetShirtColor(), t.GetSleevesColor(), t.GetShortsColor()); }
public void SetAwayKit(TeamSettings t) { Away.SetKitColors (t.GetShirtColor(), t.GetSleevesColor(), t.GetShortsColor ()); }
public void PlayerDied() { var deadPlayer = DeadPlayersModular.Items[DeadPlayersModular.Items.Count - 1]; if (ActivePlayersModular.Items.Count == 0) { Debug.LogError("Everyone's dead!"); return; } // Is there only one team? bool oneTeamRemaining = true; var winningTeamValue = ActivePlayersModular.Items[0].Settings.Team; for (int i = 1; i < ActivePlayersModular.Items.Count; i++) { if (winningTeamValue != ActivePlayersModular.Items[i].Settings.Team) { oneTeamRemaining = false; break; } } // If more than one team, battle is still on if (!oneTeamRemaining) { return; } WinningTeam = Teams[winningTeamValue]; // If the attacker team won, we're moving forward in the sequence bool forwardInSequence = WinningTeam.Role == Role.Attacker; NextLevelIndex = CurrentLevelIndex + (forwardInSequence ? +1 : -1); // If there's a level to go, we get it if (NextLevelIndex >= 0 && NextLevelIndex < LevelSequence.Length) { Level nextLevel = NextLevel; // Open level gates var currentLevelGate = CurrentLevel.Gates[WinningTeam.Side.GetOpposite()]; var nextLevelGate = nextLevel.Gates[WinningTeam.Side]; currentLevelGate.OpenForLeaving(); nextLevelGate.OpenForEntering(); // position next level on the appropriate side // @TODO USE BOUNDS, NOT SIZE // @TODO USE BOUNDS, NOT SIZE // @TODO USE BOUNDS, NOT SIZE var currentLevelBounds = CurrentLevel.GetComponent <BoxCollider>(); var nextLevelBounds = nextLevel.GetComponent <BoxCollider>(); Vector3 nextLevelside = WinningTeam.Side.GetOpposite().GetVector(); nextLevel.transform.position = CurrentLevel.transform.position + nextLevelside * .5f * (currentLevelBounds.size.x * currentLevelBounds.transform.lossyScale.x + nextLevelBounds.size.x * nextLevelBounds.transform.lossyScale.x); // Procceed GameGUI.Instance.Go(WinningTeam.Side.GetOpposite()); nextLevel.gameObject.SetActive(true); } else { GameGUI.Instance.Winner(WinningTeam.Color); Debug.Log(WinningTeam.name + " Won!"); } }
void IMegaloVariant.Create(GameVariant gt, MegaloData megalo) { gt.HasWeaponTuning = false; #region Base Variant // Metadata var metadata = new ContentMetadata { Name = "Race v2.0", Description = "Gentlemen, start your engines.", CreatedBy = new ContentAuthor("synth92"), ModifiedBy = new ContentAuthor("synth92"), VariantIcon = VariantIcon.Race, }; gt.Metadata = metadata; // General Settings var generalSettings = new GeneralSettings { PointsSystemEnabled = false, NumberOfRounds = 1, TeamsEnabled = false, }; gt.GeneralSettings = generalSettings; // Respawn Settings var respawnSettings = new RespawnSettings { BetrayalPenalty = 0, SuicidePenalty = 0, InitialRespawnDuration = 3, MinimumRespawnDuration = 3, }; gt.RespawnSettings = respawnSettings; // Social Settings var socialSettings = new SocialSettings { BetrayalBooting = false, FriendlyFireEnabled = false, OpenChannelVoice = true, DeadPlayerVoice = true, EnemyVoice = true, }; gt.SocialSettings = socialSettings; // Map Overrides var mapOverrides = new MapOverrides { ArmorAbilitiesOnMap = false, GrenadesOnMap = false, IndestructibleVehicles = true, VehicleSet = VehicleSet.DeleteAllExceptMongoose, WeaponSet = WeaponSet.NoWeapons, }; gt.MapOverrides = mapOverrides; #region Base Player Traits var baseTraits = new PlayerTraits(); gt.MapOverrides.BasePlayerTraits = baseTraits; // Base Player Traits -> Appearance baseTraits.Appearance.DeathEffect = ArmorEffect.GruntBirthdayParty; baseTraits.Appearance.GamertagVisibility = HudVisibility.VisibleToEveryone; baseTraits.Appearance.WaypointVisibility = HudVisibility.VisibleToEveryone; // Base Player Traits -> Armor baseTraits.Armor.AssassinationImmunity = TraitFlag.Enabled; baseTraits.Armor.Invincibility = TraitFlag.Enabled; // Base Player Traits -> Appearance baseTraits.Equipment.InitialPrimaryWeapon = Weapon.SpartanLaser; baseTraits.Equipment.InitialSecondaryWeapon = Weapon.NoWeapon; baseTraits.Equipment.TacticalPackage = ArmorMod.NoTacticalPackage; baseTraits.Equipment.SupportUpgrade = ArmorMod.NoSupportUpgrade; // Base Player Traits -> Movement baseTraits.Movement.Sprint = TraitFlag.Disabled; baseTraits.Movement.VehicleUsage = VehicleUsageMode.DriverOnly; // Base Player Traits -> Screen & Audio baseTraits.ScreenAndAudio.MotionSensor = MotionSensorMode.Enhanced; baseTraits.ScreenAndAudio.ShieldHud = TraitFlag.Disabled; #endregion // Loadouts var loadouts = new LoadoutSettings { PersonalLoadoutsEnabled = false, MapLoadoutsEnabled = false, }; gt.LoadoutSettings = loadouts; // Teams var teams = new TeamSettings(); gt.TeamSettings = teams; teams[0].Name.Set("Racers"); teams[1].Name.Set("Observers"); // Ordnance var ordnanceSettings = new OrdnanceSettings { InitialOrdnanceEnabled = false, RandomOrdnanceEnabled = false, PersonalOrdnanceEnabled = false, }; gt.OrdnanceSettings = ordnanceSettings; #endregion }
/******************** Public Interface ********************/ public void SetPlayerSettings(InputDevice device, CharacterSettings charSet, TeamSettings teamSet) { input = device; charSettings = charSet; teamSettings = teamSet; }
public PlayerInfo(InputDevice dev, CharacterSettings cs, TeamSettings ts) { input = dev; charSettings = cs; teamSettings = ts; }
public void SetHomeKit(TeamSettings t) { Home.SetKitColors(t.GetShirtColor(), t.GetSleevesColor(), t.GetShortsColor()); }
public void SetHomeKit(TeamSettings t) { Home.SetKitColors (t.GetShirtColor(), t.GetSleevesColor(), t.GetShortsColor ()); }
/// <summary> /// Add Team to an existing unified group. Not yet completed /// </summary> /// <returns>true if the operation is successful</returns> /// <remarks>Adding Team through Graph is currently in Beta. APIs under the /beta version in Microsoft Graph are in preview and are subject to change. Use of these APIs in production applications is not supported. private static async Task <bool> AddTeamToUnifiedGroup(HttpClient delegatedAccessClient, Guid groupId, TeamSettings teamSettings, TraceWriter log) { //TODO: only support Work Delegated permission in the beta reference. Team is not in GCC yet. The current Graph URL is //https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/api/team_put_teams //https://microsoftteams.uservoice.com/forums/555103-public/suggestions/16972258-developer-api-to-read-create-teams-and-channels-in?page=2&per_page=20 log.Info($"Adding Team to Group { groupId }"); string putUrl = $"https://graph.microsoft.com/beta/groups/{groupId}/team"; var payload = JsonConvert.SerializeObject(teamSettings); HttpContent content = new StringContent(payload, Encoding.UTF8, "application/json"); //Put command to Graph var response = await delegatedAccessClient.PutAsync(putUrl, content); if (response.IsSuccessStatusCode) { log.Info($"Added Team to group {groupId}"); return(true); } else { log.Info($"FAILED to add Team to group {groupId} with status code { response.StatusCode } "); log.Info(response.Content.ReadAsStringAsync().Result); return(false); } }
/**************** Configuration Funcs ****************/ public void AddPlayer(InputDevice input, CharacterSettings charSet, TeamSettings teamSet) { PlayerInfo new_player = new PlayerInfo(input, charSet, teamSet); players.Add(new_player); }
public override void OnInspectorGUI() { _leaders = _bGContainerSave.leaders; _minions = _bGContainerSave.minions; _ts = _bGContainerSave.ts; EditorGUILayout.LabelField("Leaders", _headerlv1); for (int i = 0; i < _leaders.Count; i++) { TeamSettings ts = _ts[i]; EditorGUILayout.ObjectField("Leader " + (i + 1), _leaders[i], typeof(GameObject), false); ts.leaderPosition = EditorGUILayout.Vector3Field("Position", ts.leaderPosition); ts.leaderHealth = EditorGUILayout.FloatField("Health", ts.leaderHealth); ts.leaderSpeed = EditorGUILayout.FloatField("Speed", ts.leaderSpeed); ts.leaderMeleeDamage = EditorGUILayout.FloatField("Melee Damage", ts.leaderMeleeDamage); ts.leaderMeleeRate = EditorGUILayout.FloatField("Melee Rate", ts.leaderMeleeRate); ts.leaderMeleeDistance = EditorGUILayout.FloatField("Melee Distance", ts.leaderMeleeDistance); ts.leaderShootDamage = EditorGUILayout.FloatField("Shoot Damage", ts.leaderShootDamage); ts.leaderShootRate = EditorGUILayout.FloatField("Shoot Rate", ts.leaderShootRate); ts.leaderShootDistance = EditorGUILayout.FloatField("Shoot Distance", ts.leaderShootDistance); ts.leaderVisionDistance = EditorGUILayout.FloatField("Vision Distance", ts.leaderVisionDistance); ts.leaderVisionRangeAngles = EditorGUILayout.FloatField("Vision Angles", ts.leaderVisionRangeAngles); EditorGUILayout.Space(); } EditorGUILayout.Space(); var rect = EditorGUILayout.GetControlRect(true, 1); EditorGUI.DrawRect(rect, Color.gray); EditorGUILayout.Space(); EditorGUILayout.LabelField("Minions", _headerlv1); for (int i = 0; i < _minions.Count; i++) { TeamSettings ts = _ts[i]; EditorGUILayout.LabelField("Minion group " + (i + 1), _headerlv2); for (int j = 0; j < _minions[i].Count; j++) { EditorGUILayout.ObjectField("Minion " + (j + 1), _minions[i][j].minion, typeof(GameObject), false); EditorGUILayout.Vector3Field("Position", _minions[i][j].position); } EditorGUILayout.Space(); ts.minionHealth = EditorGUILayout.FloatField("Health", ts.minionHealth); ts.minionSpeed = EditorGUILayout.FloatField("Speed", ts.minionSpeed); ts.minionMeleeDamage = EditorGUILayout.FloatField("Melee Damage", ts.minionMeleeDamage); ts.minionMeleeRate = EditorGUILayout.FloatField("Melee Rate", ts.minionMeleeRate); ts.minionMeleeDistance = EditorGUILayout.FloatField("Melee Distance", ts.minionMeleeDistance); ts.minionShootDamage = EditorGUILayout.FloatField("Shoot Damage", ts.minionShootDamage); ts.minionShootRate = EditorGUILayout.FloatField("Shoot Rate", ts.minionShootRate); ts.minionVisionDistance = EditorGUILayout.FloatField("Vision Distance", ts.minionVisionDistance); ts.minionVisionRangeAngles = EditorGUILayout.FloatField("Vision Angle", ts.minionVisionRangeAngles); EditorGUILayout.Space(); ts.flockEntityRadius = EditorGUILayout.FloatField("Flocking radius", ts.flockEntityRadius); LayerMask tempMask = EditorGUILayout.MaskField("Flock Entity Mask", InternalEditorUtility.LayerMaskToConcatenatedLayersMask(ts.flockEntityMask), InternalEditorUtility.layers); ts.flockEntityMask = InternalEditorUtility.ConcatenatedLayersMaskToLayerMask(tempMask); ts.flockLeaderBehaviourWeight = EditorGUILayout.FloatField("Leader Weight", ts.flockLeaderBehaviourWeight); ts.flockLeaderBehaviourMinDistance = EditorGUILayout.FloatField("Leader Min Distance", ts.flockLeaderBehaviourMinDistance); ts.flockAlineationBehaviourWeight = EditorGUILayout.FloatField("Alineation Weight", ts.flockAlineationBehaviourWeight); ts.flockSeparationBehaviourWeight = EditorGUILayout.FloatField("Separation Weight", ts.flockSeparationBehaviourWeight); ts.flockSeparationBehaviourRange = EditorGUILayout.FloatField("Separation Range", ts.flockSeparationBehaviourRange); ts.flockCohesionBehaviourWeight = EditorGUILayout.FloatField("Cohesion Weight", ts.flockCohesionBehaviourWeight); ts.flockAvoidanceBehaviourWeight = EditorGUILayout.FloatField("Avoidance Weight", ts.flockAvoidanceBehaviourWeight); tempMask = EditorGUILayout.MaskField("Avoidance Mask", InternalEditorUtility.LayerMaskToConcatenatedLayersMask(ts.flockAvoidanceBehaviourMask), InternalEditorUtility.layers); ts.flockAvoidanceBehaviourMask = InternalEditorUtility.ConcatenatedLayersMaskToLayerMask(tempMask); ts.flockAvoidanceBehaviourRange = EditorGUILayout.FloatField("Avoidance Range", ts.flockAvoidanceBehaviourRange); _ts[i] = ts; EditorGUILayout.Space(); } rect = EditorGUILayout.GetControlRect(true, 1); EditorGUI.DrawRect(rect, Color.gray); _bGContainerSave.leaders = _leaders; _bGContainerSave.minions = _minions; _bGContainerSave.ts = _ts; }