Example #1
0
    public void OnTriggerEnter2D(Collider2D collider)
    {
        Faller faller = collider.gameObject.GetComponent <Faller>();

        if (faller != null && faller.gameObject.tag != "Blockee")
        {
            GlobalFlags.SetFlag(flag, true);
        }
    }
Example #2
0
    public override void Interact()
    {
        base.Interact();

        if (GlobalFlags.IsSet(switchable))
        {
            GlobalFlags.SetFlag(flag, !GlobalFlags.IsSet(flag));
        }
        else
        {
            GlobalFlags.SetFlag(flag, true);
        }
    }