/// <summary> /// Initializes group and sets given Team as the group owner /// </summary> /// <param name="own"></param> public GroupMovables(TeamControl.Team own) : base(own) { CountBasicBonuses(); groupIGameActionList.Add(new DieAction <IMovableGameObject>(groupMembers)); groupIGameActionList.Add(new StopMoveAction(groupMembers)); }
/// <summary> /// Initializes mission targets. If the initialization of the target /// fails so the target is removed as complete. /// </summary> public void Initialize() { foreach (var target in new List<ITarget>(targetList)) { if (!target.Initialize()) { targetList.Remove(target); } } playerTeam = Game.TeamManager.GetTeam(Game.PlayerName); }
/// <summary> /// Initializes mission target: gets the team-target. /// </summary> /// <returns>Returns if initialization was successful.</returns> public bool Initialize() { team = Game.TeamManager.GetTeam(teamName); // Team does't exist = eliminated if (team == null) { return false; } else { return true; } }
/// <summary> /// Initializes mission targets. If the initialization of the target /// fails so the target is removed as complete. /// </summary> public void Initialize() { foreach (var target in new List <ITarget>(targetList)) { if (!target.Initialize()) { targetList.Remove(target); } } playerTeam = Game.TeamManager.GetTeam(Game.PlayerName); }
/// <summary> /// Initializes mission target: gets the team-target. /// </summary> /// <returns>Returns if initialization was successful.</returns> public bool Initialize() { team = Game.TeamManager.GetTeam(teamName); // Team does't exist = eliminated if (team == null) { return(false); } else { return(true); } }
/// <summary> /// Returns the object which will be attacked. Object is represented as Property for better reactions /// to death of the object. If one of the sides has no member so the fight is ends. /// </summary> /// <param name="team">Used for find another oponent.</param> /// <returns>Returns next target of the asking team.</returns> public Property <IGameObject> GetTarget(TeamControl.Team team) { if (groupAttackers.Count == 0 || (imgoDeffenders.Count == 0 && isgoDeffenders.Count == 0)) { // Fight ends EndFight(); return(null); } if (team == groupAttackers.Team) { // It is attacker return(attackerTarget); } else { //It is deffender return(deffenderTarget); } }
/// <summary> /// Initializes group and adds group game action (DieAction). /// </summary> /// <param name="own">The owner of the group.</param> public GroupStatics(TeamControl.Team own) : base(own) { groupIGameActionList.Add(new DieAction <IStaticGameObject>(groupMembers)); }