Exemple #1
0
    void Start()
    {
        if (ManInstance.instance != null)
        {
            maninstance = ManInstance.instance;
        }

        if (maninstance != null)
        {
            ManInstance.instance.OnInstanceChanged += handleOnInstanceChanged;
            maninstance.OnFloatAndStringChanged    += handleOnFloatAndStringChanged;
        }

        if (Movement.instance != null)
        {
            Movement.instance.CharacterJumped += handlePlayerJumped;
        }

        if (Shooting.instance != null)
        {
            Shooting.instance.OnEnemyShot += handleOnEnemyShot;
        }
        if (EnemyShoot.instance != null)
        {
            EnemyShoot.instance.OnPlayerShot += handleOnPlayerShot;
        }
    }
Exemple #2
0
 void Awake()
 {
     instance = this;
     StartCoroutine("WaitToSendEvents");
 }