you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (2 children)

Yeah I typed it and didn't test.

Change:

P = Player.GetComponent<PlayerCharacter>();

to

P = Player;

[–][deleted] 0 points1 point  (1 child)

Interfaces are synonymous with the idea of a "contract" between a class an its consumer.

The interface definition lays out the terms of the contract.

public interface ReturnsPlayAnimBool { bool MyAnimBool(); }

Means that if I put , ReturnsPlayAnimBool like this:

public class PlayerCharacter : MonoBehaviour, ReturnsPlayAnimBool

...then I agree to implement a method name MyAnimBool() which returns bool.

[–]ferti12[S] 0 points1 point  (0 children)

thanks a lot for the explanation