Beispiel #1
0
    IEnumerator Arm()
    {
        LitFlame();

        yield return(new WaitForTurns(fuseTurnDuration));

        Explode();

        yield return(new WaitForSeconds(Managers.Turn.turnDuration));

        Vector3 loc = transform.position;

        gameObject.SetActive(false);

        GameObject[] affected = GetAffected(loc);

        foreach (GameObject thing in affected)
        {
            if (!isDestructible(thing))
            {
                continue;
            }

            if (thing.tag == "Player")
            {
                Managers.Level.Warp();
                yield break;
            }

            Door door = thing.GetComponent <Door>();
            if (door != null)
            {
                door.Open();
                continue;
            }

            Resetable resetable = thing.GetComponent <Resetable>();
            if (resetable != null)
            {
                resetable.Reset();
                continue;
            }

            //else
            thing.SetActive(false);
        }
    }
Beispiel #2
0
 public void Reset()
 {
     m_CurrentScrollPosition.Reset();
 }