/// <summary> /// Updates the config and all of its components /// </summary> public void UpdateConfig(EF_Player aPlayer) { if (OnUpdateConfig != null && aPlayer) { UpdateConfigArgs args = new UpdateConfigArgs(); args.aPlayer = aPlayer; OnUpdateConfig(args); } }
public void UpdateComponent(UpdateConfigArgs args) { if (args != null) { if (args.aPlayer) { player = args.aPlayer; if (!rb) { rb = args.aPlayer.GetComponent <Rigidbody>(); } HandleUpdate(); } } }