private void Start()
 {
     particleSystem              = transform.GetComponentInChildren <ParticleSystem>();
     eventSubject                = GameManager.Instance.inputEventSubject;
     eventSubject                = GameManager.Instance.inputEventSubject;
     eventSubject.UserInput     += OnUserInput;
     eventSubject.UserInputStop += OnUserInputStop;
 }
Ejemplo n.º 2
0
 void Awake()
 {
     if (Instance == null)
     {
         Instance          = this;
         inputEventSubject = new InputEventSubject();
         DontDestroyOnLoad(gameObject);
     }
     else
     {
         Destroy(gameObject);
     }
 }
 void Start()
 {
     eventSubject            = GameManager.Instance.inputEventSubject;
     eventSubject.UserInput += (object source, UserInputEventArgs args) => { print(args.Direction); };
     rigidBody.isKinematic   = true;
 }