public void GiveTeamMoney(TeamIndex teamIndex, uint money) { if (!NetworkServer.active) { Debug.LogWarning("[Server] function 'System.Void RoR2.TeamManager::GiveTeamMoney(RoR2.TeamIndex,System.UInt32)' called on client"); return; } int num = Run.instance ? Run.instance.livingPlayerCount : 0; if (num != 0) { money = (uint)Mathf.CeilToInt(money / (float)num); } ReadOnlyCollection <TeamComponent> teamMembers = TeamComponent.GetTeamMembers(teamIndex); for (int i = 0; i < teamMembers.Count; i++) { CharacterBody component = teamMembers[i].GetComponent <CharacterBody>(); if (component && component.isPlayerControlled) { CharacterMaster master = component.master; if (master) { master.GiveMoney(money); } } } }
private void Update() { //Do stuff here on every tick if (Input.GetKeyDown(KeyCode.G)) { Player.GiveMoney(1); } if (Input.GetKeyDown(KeyCode.Delete)) { riskofrainfunsies.Loader.Unload(); } }
private static void GiveMoney() { LocalPlayer.GiveMoney(moneyToGive); }