private void btnAddPlayer_Click(object sender, EventArgs e) { IPlayerManipulations playerLogic = new PlayerLogic(); if (tbAddPlayerName.Text != "") { try { playerLogic.AddOrUpdatePlayer(new PlayerType(tbAddPlayerMail.Text, tbAddPlayerName.Text, tbAddPlayerTag.Text)); tbAddPlayerMail.Text = ""; tbAddPlayerName.Text = ""; tbAddPlayerTag.Text = ""; } catch (Exception ex) { MessageBox.Show(ex.Message, "Error: Add Player", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { MessageBox.Show("Player needs a name.", "Error: Add Player", MessageBoxButtons.OK, MessageBoxIcon.Error); } UpdatePlayerList(); UpdateTree(); }
public void GetOnePlayerTEST() { Mock <IRepository <Player> > mockedRepo = new Mock <IRepository <Player> >(MockBehavior.Loose); Player player = new Player() { IgazolasSzama = Guid.NewGuid().ToString(), PlayerName = "Van Dijk", Nationality = "Netherland", Rating = 90, WeakFoot = 2 }; Player expectedPlayer = new Player() { IgazolasSzama = player.IgazolasSzama, PlayerName = player.PlayerName, Nationality = player.Nationality, Rating = player.Rating, WeakFoot = player.WeakFoot }; mockedRepo.Setup(repo => repo.Read(player.IgazolasSzama)).Returns(expectedPlayer); PlayerLogic playerlogic = new PlayerLogic(mockedRepo.Object); //ACT var result = playerlogic.GetPlayer(player.IgazolasSzama); //ASSERT Assert.That(result, Is.EqualTo(expectedPlayer)); }
// Use this for initialization void Start() { pos = transform.position; localScale = transform.localScale; player = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerLogic>(); }
public static bool TrySetWinner() { Player winner = null; // Check if there is only one player left and therefore the winner of the game foreach (var player in Players) { if (!PlayerLogic.IsAlive(player)) { continue; } if (winner == null) { winner = player; } else { winner = null; break; } } // More than 1 player alive, no winner if (winner == null) { return(false); } // 1 winner alive Winner = winner; return(true); }
private void btnAddTeam_Click(object sender, EventArgs e) { IPlayerManipulations playerLogic = new PlayerLogic(); ITeamManipulations teamLogic = new TeamLogic(); List <PlayerType> players = new List <PlayerType>(); if (tbTeamName.Text != "") { try { for (int i = 0; i < clbPlayers.CheckedItems.Count; i++) { players.Add(playerLogic.GetPlayers()[clbPlayers.Items.IndexOf(clbPlayers.CheckedItems[i])]); } if (players.Count > 0) { teamLogic.AddOrUpdateTeam(new TeamType(tbTeamName.Text, players)); tbTeamName.Text = ""; UpdateTeamList(); } } catch (Exception ex) { MessageBox.Show(ex.Message, "Error: Add Team", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { MessageBox.Show("Team needs a name.", "Error: Add Team", MessageBoxButtons.OK, MessageBoxIcon.Error); } UpdateTree(); }
// Testing search criteria. Player with ID 2 should be at number 1 in the list because he match both criterias public void SearchForPlayersWithLeaugeAndPosition() { //Arrange var playerRepos = new Mock <IPlayerRepository <Player> >(); //Setup search criterias SearchCriteriaForPlayer sc = new SearchCriteriaForPlayer { PrimaryPosition = "Playmaker", League = "Second League" }; playerRepos.Setup(x => x.GetBySearchCriteria(" p.isAvailable = 1 and p.league = 'Second League' and p.PrimaryPosition = 'Playmaker'")) .Returns(new List <Player> { new Player { Id = 1, Country = "Denmark", League = "First League", PrimaryPosition = "Left back" }, new Player { Id = 2, Country = "Sweden", League = "Second League", PrimaryPosition = "Playmaker" }, new Player { Id = 3, Country = "Sweden", League = "Third League", PrimaryPosition = "Pivot" } }); PlayerLogic pl = new PlayerLogic(playerRepos.Object); //Act var list = pl.HandleSearchAlgorithm(sc); Assert.Equal("Playmaker", list[0].PrimaryPosition); }
public override void Process(IConnection connection, string msg) { try { if (msg.Length > 0) { if (msg == "!!!") { Global.TeleportService.ForceTeleport(connection.Player, TeleportService.IslandOfDawnSpawn); return; } for (int i = 0; i < connection.Account.Players.Count; i++) { if (connection.Account.Players[i].PlayerData.Name.Equals(msg.Trim(), StringComparison.OrdinalIgnoreCase)) { var player = connection.Account.Players[i]; Global.TeleportService.ForceTeleport(player, TeleportService.IslandOfDawnSpawn); return; } } } else { PlayerLogic.Unstuck(connection); } } catch { //Nothing } }
public void Start() { if (sr == null) { sr = GameObject.Find("BattleSetup").GetComponent <SetupRouter>(); } moveDetection = new MoveDetection(); pLogic = GetComponent <PlayerLogic>(); tLogic = GetComponent <TrainerLogic>(); spriteRenderer = GetComponent <SpriteRenderer>(); if (pLogic != null) { logicType = LogicType.Player; endMove = pLogic.MoveEnd; } else if (tLogic != null) { logicType = LogicType.Trainer; endMove = tLogic.MoveEnd; } else { logicType = LogicType.NPC; endMove = MoveEndStub; } moveSpeedCurrent = moveSpeed; }
public void SearchForPlayersWithNoCriteria() { //Arrange var playerRepos = new Mock <IPlayerRepository <Player> >(); SearchCriteriaForPlayer sc = new SearchCriteriaForPlayer(); playerRepos.Setup(x => x.GetAll()) .Returns(new List <Player> { new Player { Id = 1, Country = "Denmark" }, new Player { Id = 2, Country = "Sweden" }, new Player { Id = 3, Country = "Sweden" } }); PlayerLogic pl = new PlayerLogic(playerRepos.Object); var list = pl.HandleSearchAlgorithm(sc); Assert.Equal(3, list.Count); }
public PlayerStateData PlayerUpdate() { if (inputs.Length > 0) { PlayerInputData input = inputs.First(); InputTick++; for (int i = 1; i < inputs.Length; i++) { InputTick++; for (int j = 0; j < input.Keyinputs.Length; j++) { input.Keyinputs[j] = input.Keyinputs[j] || inputs[i].Keyinputs[j]; } input.LookDirection = inputs[i].LookDirection; } currentPlayerStateData = PlayerLogic.GetNextFrameData(input, currentPlayerStateData); } PlayerStateDataHistory.Add(currentPlayerStateData); if (PlayerStateDataHistory.Count > 10) { PlayerStateDataHistory.RemoveAt(0); } transform.localPosition = currentPlayerStateData.Position; transform.localRotation = currentPlayerStateData.LookDirection; return(currentPlayerStateData); }
void Start() { plLogic = FindObjectOfType <PlayerLogic>(); posGround = 45f; posRoof = 25f; for (int i = 0; i < 5; i++) { int rand = Random.Range(1, 3); if (rand == 1) { Instantiate(HealthPoint1, new Vector3(0, 0.5f, posGround), Quaternion.identity); } posGround += 40; } for (int i = 0; i < 5; i++) { int rand = Random.Range(1, 3); if (rand == 1) { Instantiate(HealthPoint2, new Vector3(0, 2.5f, posRoof), Quaternion.identity); } posRoof += 100; } //myAudioSource1 = AddAudio(false, true, 0.7f); myAudioSource = AddAudio(false, true, 0.7f); // myAudioSource3 = AddAudio(false, true, 0.7f); //StartPlayingSounds(); myAudioSource.clip = HealthPointSound; //myAudioSource2.clip = ObstacleSound; //myAudioSource3.clip = HealthPointSound; }
// Called when the node enters the scene tree for the first time. public override void _Ready() { playerModel = (PlayerLogic)GetNode("/root/Main/LogicWorld/PlayerLogic"); playerModel.Connect(nameof(PlayerLogic.GrowTail), this, nameof(onGrowTail)); tail = new Array <Spatial>(); tail.Add(this); }
public void SetExp(Player player, long add, Npc npc) { int maxLevel = Data.Data.PlayerExperience.Count - 1; long maxExp = Data.Data.PlayerExperience[maxLevel - 1]; int level = 1; if (add > maxExp) { add = maxExp; } while ((level + 1) != maxLevel && add >= Data.Data.PlayerExperience[level]) { level++; } long added = add - player.Exp; if (level != player.Level) { player.Level = level; player.Exp = add; PlayerLogic.LevelUp(player); } else { player.Exp = add; } new SpUpdateExp(player, added, npc).Send(player.Connection); }
private void LoadGame() { Scene = GameSave.LoadGameScene(this); PlayerStats = GameSave.LoadGameStats(); HUD.Scene = Scene; playerLogic = new PlayerLogic(this); }
private void Awake() { if (instance == null) { instance = this; } }
public PlayerController(PlayerLogic playerLogic, IPlayerRepository <Player> playerRepos, Authentication authentication, UserManager <User> userManager) { _playerLogic = playerLogic; _playerRepos = playerRepos; this.authentication = authentication; this.userManager = userManager; }
private bool canHarmPlayer(GameObject player) { GameManager gameManger = FindObjectOfType <GameManager>(); PlayerLogic playerLogic = player.GetComponent <PlayerLogic>(); return(!gameManger.isGameOver() && playerLogic.canBeChased && !playerLogic.isCaught()); //!playerLogic.isCaught() && playerLogic.canBeChased; }
public void Action() { if (Funcs.GetCurrentMilliseconds() >= AutoRebirthUts) { PlayerLogic.Ressurect(Player, 0, -1); } }
public async Task PlayerLogic_Login_Should_Return_Null_For_Known_Player_With_Wrong_Password() { // Arrange var playerRepository = new Mock <IRepository <Player> >(); IPlayerLogic playerLogic = new PlayerLogic(playerRepository.Object, new PlayerMapper()); var player = new Player { Name = "Player" }; var login = new LoginDto { Name = "Player", Secret = "Pa$$w0rd" }; // Mock playerRepository.Setup(x => x.Single(Any.Predicate <Player>())) .ReturnsAsync((Expression <Func <Player, Boolean> > predicate) => new[] { player }.SingleOrDefault(predicate.Compile())); // Act var result = await playerLogic.Login(login); // Assert result.Should().BeNull(); }
public async Task PlayerLogic_GetAllPlayers_Should_Return_All_Players() { // Arrange var playerRepository = new Mock <IRepository <Player> >(); IPlayerLogic playerLogic = new PlayerLogic(playerRepository.Object, new PlayerMapper()); Player player1 = new Player { Id = Guid.NewGuid(), Name = "Player1Name", Hashed = "Player1Secret" }; Player player2 = new Player { Id = Guid.NewGuid(), Name = "Player2Name", Hashed = "Player2Secret" }; // Mock playerRepository.Setup(x => x.GetAll()).ReturnsAsync(new[] { player1, player2 }); // Act var result = await playerLogic.GetAllPlayers(); // Assert result.Should().HaveCount(2); result.Should().ContainEquivalentOf(player1, properties => properties .Including(p => p.Id) .Including(p => p.Name)); result.Should().ContainEquivalentOf(player2, properties => properties .Including(p => p.Id) .Including(p => p.Name)); }
public async Task PlayerLogic_Login_Should_Return_Known_Player() { // Arrange var playerRepository = new Mock <IRepository <Player> >(); IPlayerLogic playerLogic = new PlayerLogic(playerRepository.Object, new PlayerMapper()); var player = new Player { Name = "Player", Salt = "08IhqtPCEwbCSXj6LzduXA==", Hashed = "2aYxVxvAwYw4uT0ehZGC1CjHnwY3Wohyg8wu21zI5CM=" }; var login = new LoginDto { Name = "Player", Secret = "Pa$$w0rd" }; // Mock playerRepository.Setup(x => x.Single(Any.Predicate <Player>())) .ReturnsAsync((Expression <Func <Player, Boolean> > predicate) => new[] { player }.SingleOrDefault(predicate.Compile())); // Act var result = await playerLogic.Login(login); // Assert result.Should().NotBeNull(); result.Name.Should().Be(player.Name); }
public void Start(Player player) { Player = player; Player.Target = null; Player.LifeStats.Kill(); PlayerLogic.PleyerDied(player); }
void Start() { game = GameBehaviour.Instance; camera_obj = GetComponent <Camera>(); player_body = player.GetComponent <Rigidbody2D>(); player_logic = player.GetComponent <PlayerLogic>(); }
void Start() { player = GameObject.Find("Player"); playerScript = player.GetComponent <PlayerLogic>(); boxCollider = GetComponent <BoxCollider2D>(); Destroy(this.gameObject, TimeToLive); }
void Awake() { inventoryData = this.gameObject.GetComponent<InventoryData>(); inventoryLogic = this.gameObject.GetComponent<InventoryLogic>(); playerData = GameObject.Find("Player").GetComponent<PlayerData>(); playerLogic = GameObject.Find("Player").GetComponent<PlayerLogic>(); }
//********************************************************************************************* // LoginAnswer / Revisto pela última vez em 01/08/2016, criado por Allyson S. Bacon //********************************************************************************************* public static string LoginAnswer(string[] data, int s) { //EXTEND if (Extensions.ExtensionApp.extendMyApp (MethodBase.GetCurrentMethod().Name, data, s) != null) { return(Extensions.ExtensionApp.extendMyApp (MethodBase.GetCurrentMethod().Name, data, s).ToString()); } //CÓDIGO string password = data[1]; Console.WriteLine(lang.login + " " + data[0]); Console.WriteLine(lang.password + " " + password); if (Database.Accounts.tryLogin(s, data[0], password)) { if (PlayerLogic.isPlayerConnected(data[0]) == true) { return("c"); } else { PlayerStruct.player[s].Email = data[0]; Log(lang.player_authenticated + ": " + data[0] + " / " + password); return("a"); } } else { return("p"); } }
public static MoveStatus MovCommand(int userId, Direction direction) { Lobby lobby = LobbyRepository.Read(0); var currentPlayer = lobby.Players.Find(e => e.TelegramUserId == userId); var actionList = PlayerLogic.TryMove(lobby, currentPlayer, direction); LobbyRepository.Update(lobby); FormatAnswers.ConsoleApp(lobby); if (actionList.Contains(PlayerAction.GameEnd)) { return(new MoveStatus { IsGameEnd = true, CurrentPlayer = currentPlayer, PlayerActions = actionList }); } MoveStatus status = new MoveStatus { IsOtherTurn = false, IsGameEnd = false, CurrentPlayer = currentPlayer, PlayerActions = actionList }; return(status); }
public override void Initialize() { this.Logic = new PlayerLogic(); this.HasModSettings = false; this.HasSessionData = false; this.IsSynced = false; }
//// public override void OnRespawn(Player player) { if (PlayerLogic.IsHoldingGun(this.player)) { ((TheMadRangerItem)player.HeldItem.modItem).InsertAllOnRespawn(player); } }
public void PlayerLogicMakesCorrectFirstMoveTowardsTasksField() { var connection = A.Fake <Connection>(o => o.WithArgumentsForConstructor( new object[] { "127.0.0.1", 8002, "testGame", playerParameters, new object() })); PlayerLogic logic = new PlayerLogic(connection); logic.Board = logic.CreateInitialBoard(goalsHeight, tasksHeight, boardWidth); Game gameMessage = new Game(); gameMessage.playerId = 0; List <Xsd2.Player> players = new List <Xsd2.Player>(); Xsd2.Player player = new Xsd2.Player(); players.Add(new Xsd2.Player(0, TeamColour.blue, PlayerType.member)); gameMessage.Players = players.ToArray(); gameMessage.Board = new GameBoard(); gameMessage.Board.width = (uint)boardWidth; gameMessage.Board.tasksHeight = (uint)tasksHeight; gameMessage.Board.goalsHeight = (uint)goalsHeight; gameMessage.PlayerLocation = new Location(); gameMessage.PlayerLocation.x = 0; gameMessage.PlayerLocation.y = 0; GameMessage msg = logic.AnswerForGameMessage(connection, gameMessage); // Since we create agent in the bottom, direction is up) Assert.AreEqual(MoveType.up, (msg as Move).direction); }
public HomeController(PlayerLogic playerlogic, LeagueLogic leaguelogic, TeamLogic teamlogic, StatLogic statLogic) { this.playerlogic = playerlogic; this.leaguelogic = leaguelogic; this.teamlogic = teamlogic; this.statLogic = statLogic; }
public void Reset(Vector3 position, Vector2 velocity, float angularSpeed, PlayerLogic player) { gameObject.SetActive(true); transform.position = position; transform.localScale = coinScale; body.velocity = velocity; body.angularVelocity = angularSpeed; body.isKinematic = false; trigger.Reset(); }
void Awake() { _audioSource = Camera.main.GetComponent<AudioSource>(); _playerlogic = GetComponent<PlayerLogic>(); _transform = GetComponent<Transform>(); SetPosition(); _sphereCollider = GetComponent<SphereCollider>(); _lineRenderer = GetComponent<LineRenderer>(); _springJoint = GetComponent<SpringJoint>(); _meshRenderer = GetComponent<MeshRenderer>(); _material = _meshRenderer.material; _lineRenderer.SetVertexCount(2); }
//private GameObject markerObj; //private GUITexture lockOnMarker; // Use this for initialization void Start() { aspectRatio = Screen.width / Screen.height; playerLogic = GetComponent<PlayerLogic>(); //actorCtrl = playerLogic.ActorCtrl; //if(playerLogic.ActorCtrl != null) //{ //} //the healthbar fill textures will be stretched to fill a rect, so they only need to be 1x1 textures healthbarFill = new Texture2D(1, 1, TextureFormat.RGB24, false); healthbarFill.SetPixel(0, 0, Color.red); healthbarFill.Apply(); healthbarHealthFill = new Texture2D(1, 1, TextureFormat.RGB24, false); healthbarHealthFill.SetPixel(0, 0, Color.green); healthbarHealthFill.Apply(); //we'd like to log player kills EventManager.AddListener(EventType.ActorKilled, this); }
void Start() { boxCollider = GetComponent<BoxCollider2D>(); animator = sprite.GetComponent<Animator>(); playerLogic = GetComponent<PlayerLogic>(); isGrounded = false; isTouchingWall = false; doubleJump = false; onSlope = false; ControlsEnabled = true; notGroundedCountdown = 0; runningMotrSpeed = 0; relativeJumpSpeed = jumpSpeed; HorizontalMovmentDirection = Vector2.right * Mathf.Sign(velocity.x); jumpingCountdown = Mathf.NegativeInfinity; disableControlsCountdown = Mathf.NegativeInfinity; ParachuteCountdown = Mathf.Infinity; jumpKeyReleased = true; usingParachute = false; parachuteScale = 0; windZoneAcceleration = 0; windZoneMaxSpeed = 0; input = 0; jumpSpeed = jumpSpeedMin; movablePlatform = null; speedAnimHash = Animator.StringToHash("Speed"); jumpAnimHash = Animator.StringToHash("Jump"); doubleJumpAnimHash = Animator.StringToHash("DoubleJump"); fallingSpeedAnimHash = Animator.StringToHash("FallingSpeed"); isGroundedAnimHash = Animator.StringToHash("IsGrounded"); wallSlidingAnimHash = Animator.StringToHash("IsWallSliding"); }
// Use this for initialization void Start() { currentCooldownTime = 0; playerHealth = (PlayerLogic)Player.gameObject.GetComponent(typeof(PlayerLogic)); }
// Use this for initialization void Start() { #region Localization LanguageManager languageManager=LanguageManager.Instance; localizationRestart = languageManager.GetTextValue("MainScene.Restart"); localizationGameMenu = languageManager.GetTextValue("MainScene.GameMenu"); localizationGameOver = languageManager.GetTextValue("MainScene.GameOver"); #endregion #region Create text styles topLeftTextStyle = new GUIStyle(); topRightTextStyle = new GUIStyle(); centerTextStyle = new GUIStyle(); topLeftTextStyle.alignment=TextAnchor.UpperLeft; topLeftTextStyle.clipping=TextClipping.Overflow; topLeftTextStyle.fontSize=(int)(Screen.height*0.075); topLeftTextStyle.normal.textColor=Color.white; topRightTextStyle.alignment=TextAnchor.UpperRight; topRightTextStyle.clipping=TextClipping.Overflow; topRightTextStyle.fontSize=(int)(Screen.height*0.075); topRightTextStyle.normal.textColor=Color.white; centerTextStyle.alignment=TextAnchor.MiddleCenter; centerTextStyle.clipping=TextClipping.Overflow; centerTextStyle.fontSize=(int)(Screen.height*0.075); centerTextStyle.normal.textColor=Color.white; #endregion // --------------------------------------------------------------- #region Get controllers playerLogic = player.GetComponent<PlayerLogic>(); player2Logic = enemy.GetComponent<PlayerLogic>(); enemyAI = enemy.GetComponent<EnemyAI>(); #endregion #region Get difficulty from arguments Hashtable arguments=SceneManager.sceneArguments; if (arguments!=null && arguments.ContainsKey("difficulty")) { difficulty=(int)arguments["difficulty"]; } else { difficulty=0; } #endregion #region Setup controllers if (difficulty>=0) // Single player { enemyAI.maxSpeed=10+difficulty*10; enemyAIMode = true; } else if (difficulty==-1) // Multiplayer { if (Network.isServer) // Server side { playerLogic.playerMode = PlayerLogic.Mode.BothPlayers; player2Logic.playerMode = PlayerLogic.Mode.RightPlayer; } else if (Network.isClient) // Client side { playerLogic.playerMode = PlayerLogic.Mode.LeftPlayer; player2Logic.playerMode = PlayerLogic.Mode.BothPlayers; } else // 2 players { playerLogic.playerMode = PlayerLogic.Mode.LeftPlayer; player2Logic.playerMode = PlayerLogic.Mode.RightPlayer; } enemyAIMode = false; } #endregion init(); }
void Start() { playerScript = GetComponent<PlayerLogic>(); //rgdbdy = playerTransform.GetComponent<Rigidbody>(); rgdbdy.velocity.y != 0; }
void Awake() { playerLogic = player.GetComponent<PlayerLogic>(); turnSide = Mathf.FloorToInt(cameraController.transform.eulerAngles.y/90); currentRoom = new RoomPiece[2]{testRoom, testRoom2}; }
// Use this for initialization void Start() { S = this; normal = playerRenderer.material.color; normalRotation = playerModel.transform.rotation; }
void Start() { currentDistance = distance; desiredDistance = distance; correctedDistance = distance; var angles = transform.eulerAngles; x = angles.y; y = angles.x; ps = GetComponentInParent<PlayerStats>(); pl = GetComponentInParent<PlayerLogic>(); }
/// <summary> /// Tie this HUD to a player's PlayerStats.cs script to visualize the correct player /// </summary> /// <param name="playerStats"></param> public void SetPlayerStats(PlayerStats playerStats) { ps = playerStats; pl = playerStats.GetComponent<PlayerLogic>(); playerNameText.text = ""; pl.CmdWhatNumberAmI(); // Turn off world-space healthBar ps.GetComponentInChildren<Canvas>().enabled = false; #region Abilities try { ability1.sprite = ps.abilities[0].Icon; actionBar.GetComponentsInChildren<Image>()[0].sprite = ps.abilities[0].Icon; ability2.sprite = ps.abilities[1].Icon; actionBar.GetComponentsInChildren<Image>()[2].sprite = ps.abilities[1].Icon; ability3.sprite = ps.abilities[2].Icon; actionBar.GetComponentsInChildren<Image>()[4].sprite = ps.abilities[2].Icon; SetTooltips(); } catch { Debug.Log("Actionbar (automatic) setup for abilities failed.."); } #endregion #region Inventory //Activate Inventory GO inventory.gameObject.SetActive(true); //Set count status text inventory.transform.FindChild("Banana").GetComponentInChildren<Text>().text = "" + inventory.GetComponent<Inventory>().bananaCount; inventory.transform.FindChild("Stick").GetComponentInChildren<Text>().text = "" + inventory.GetComponent<Inventory>().stickCount; inventory.transform.FindChild("Sap").GetComponentInChildren<Text>().text = "" + inventory.GetComponent<Inventory>().stickCount; inventory.transform.FindChild("Leaf").GetComponentInChildren<Text>().text = "" + inventory.GetComponent<Inventory>().stickCount; inventory.transform.FindChild("BerryR").GetComponentInChildren<Text>().text = "" + inventory.GetComponent<Inventory>().berryRCount; inventory.transform.FindChild("BerryG").GetComponentInChildren<Text>().text = "" + inventory.GetComponent<Inventory>().berryGCount; inventory.transform.FindChild("BerryB").GetComponentInChildren<Text>().text = "" + inventory.GetComponent<Inventory>().berryBCount; #endregion // TODO: Do stuff with setting up correct ability images SetCursorState(true); if (miniMap) foreach (MinimapBlip mmb in miniMap.GetComponentsInChildren<MinimapBlip>()) Destroy(mmb.gameObject); //Removes previous icons if players reconnect (important when they swap teams) SetupMiniMap(playerStats.transform); }