public override void Interact() { base.Interact(); if (GlobalFlags.IsSet(flag) || IsAlternate) { RoomTracker.MoveToRoom(room); } }
public override void Interact() { base.Interact(); if (GlobalFlags.IsSet(switchable)) { GlobalFlags.SetFlag(flag, !GlobalFlags.IsSet(flag)); } else { GlobalFlags.SetFlag(flag, true); } }
public void Setup(string movingFlag, string activeFlag, float moveSpeed, Vector3 startPos, Vector3 endPos) { this.moveSpeed = moveSpeed; if (this.movingFlag != "") { this.movingFlag = movingFlag; } if (this.activeFlag != "") { this.activeFlag = activeFlag; } this.startPos = startPos; this.endPos = endPos; this.targetPos = endPos; GlobalFlags.Subscribe(this, movingFlag); GlobalFlags.Subscribe(this, activeFlag); moving = GlobalFlags.IsSet(movingFlag); setActiveFlag(GlobalFlags.IsSet(activeFlag)); }
void Start() { setActiveFlag(GlobalFlags.IsSet(activeFlag)); }