public void OnTriggerEnter2D(Collider2D collider) { Faller faller = collider.gameObject.GetComponent <Faller>(); if (faller != null && faller.gameObject.tag != "Blockee") { GlobalFlags.SetFlag(flag, true); } }
public override void Interact() { base.Interact(); if (GlobalFlags.IsSet(switchable)) { GlobalFlags.SetFlag(flag, !GlobalFlags.IsSet(flag)); } else { GlobalFlags.SetFlag(flag, true); } }