示例#1
0
 private void Update()
 {
     if (Input.GetButtonDown(CConstants.Input.FeedSelf))
     {
         foodStorage.UseFood(health);
     }
     if (Input.GetButtonDown(CConstants.Input.FeedChildren))
     {
         var diff = nest.transform.position - transform.position;
         if (diff.sqrMagnitude <= nestFeedingRadius * nestFeedingRadius)
         {
             foodStorage.UseFood(nest);
         }
     }
 }