Пример #1
0
public void Start()
{
TestingEvents testingEvents=GetComponent<TestingEvent>();
 testingEvents.OnSpacePressed +=Testing_OnSpacePressed;
 testingEvents.OnFloatEvent +=Testing_OnFloatEvent;
 testingEvents.OnActionEvent  +=TestingEvents_OnActionEvent;
Пример #2
0
 void Start()
 {
     _testingEvents = GetComponent <TestingEvents>();
     _testingEvents.OnSpacePressed += TestingEvents_OnSpacePressed;
 }
Пример #3
0
    // Start is called before the first frame update
    void Start()
    {
        TestingEvents testingEvents = GetComponent <TestingEvents>(); // get the reference to the publisher script

        testingEvents.OnSpacePressed += Subscriber_OnSpacePressed;    // subscribe
    }