Пример #1
0
    public void Initialize(AbstractUnityEventSystem evts)
    {
        _transform     = gameObject.GetComponent <Transform>();
        _bulletManager = FindObjectOfType <BulletManager>(); // Todo: from module code?

        _eventSystem = evts;
        _eventSystem.Listen <Events.PlayerSpawned>(OnPlayerRespawned);

        Idle();
    }
Пример #2
0
 void OnEnable()
 {
     _eventSystem.Listen <Events.PlayerSpawned>(OnPlayerRespawned);
 }
Пример #3
0
    // Todo: ditch listening for player respawn events. Camera is what matters.

    void OnEnable()
    {
        _eventSystem.Listen <Events.PlayerSpawned>(spawned => _grassManager.OnSubjectTeleported());
        _cameraManager.Rig.OnTeleported += _grassManager.OnSubjectTeleported;
    }