Example #1
0
 /// <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);
     }
 }
Example #2
0
 public void UpdateComponent(UpdateConfigArgs args)
 {
     if (args != null)
     {
         if (args.aPlayer)
         {
             player = args.aPlayer;
             if (!rb)
             {
                 rb = args.aPlayer.GetComponent <Rigidbody>();
             }
             HandleUpdate();
         }
     }
 }
 void OnEnable()
 {
     targetPlayer = (EF_Player)target;
 }