Ejemplo n.º 1
0
    void Start()
    {
        firstOrEnd = this.GetComponent <FirstOrEnd>();
        lastSpartList.Add(firstOrEnd);

        foreach (FirstOrEnd Half in lastSpartList)
        {
            firstOrEnd.checkSpart
            .Where(x => x == FirstOrEnd.LastSpart.firstHalf)
            .Subscribe(_ => FirstForEnemy());

            firstOrEnd.checkSpart
            .Where(x => x == FirstOrEnd.LastSpart.lastHalf)
            .Subscribe(_ => LastForEnemy());
        }
    }
Ejemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        firstOrEnd = this.GetComponent <FirstOrEnd>();
        CheckFEList.Add(firstOrEnd);

        foreach (FirstOrEnd CheckFE in CheckFEList)
        {
            firstOrEnd.CheckFE
            .First()
            .Where(x => x == FirstOrEnd.FirstAndEnd.First)
            .Subscribe(_ => FirstMap());

            firstOrEnd.CheckFE
            .First()
            .Where(x => x == FirstOrEnd.FirstAndEnd.Centrum)
            .Subscribe(_ => StartCoroutine(DelayGetInstiance(5)));

            firstOrEnd.CheckFE
            .First()
            .Where(x => x == FirstOrEnd.FirstAndEnd.End)
            .Subscribe(_ => EndMap());
        }
    }