Exemple #1
0
 public void Use(BodyInterface user)
 {
     if (this.state == UseState.Unused)
     {
         Debug.Log("Using");
         this.user = user;
         user.NavSetTarget(this.navTarget.position);
         this.state = UseState.Approaching;
     }
 }
Exemple #2
0
 void Start()
 {
     this.bodyInterface = character.GetComponent<BodyInterface>();
     // If we're working with a reduced character, like in the HeadLook and
     // Reach demo, we might not have a BodyInterface, so we'll need to manually
     // fetch the right shadow controllers. In practice, you don't want to do this.
     if (this.bodyInterface == null)
     {
         this.reach = character.GetComponent<ShadowReachController>();
         this.headLook = character.GetComponent<ShadowHeadLookController>();
     }
 }
Exemple #3
0
 void Start()
 {
     this.bodyInterface = character.GetComponent <BodyInterface>();
     // If we're working with a reduced character, like in the HeadLook and
     // Reach demo, we might not have a BodyInterface, so we'll need to manually
     // fetch the right shadow controllers. In practice, you don't want to do this.
     if (this.bodyInterface == null)
     {
         this.reach    = character.GetComponent <ShadowReachController>();
         this.headLook = character.GetComponent <ShadowHeadLookController>();
     }
 }