Пример #1
0
    public override void Interact()
    {
        base.Interact();

        if (GlobalFlags.IsSet(flag) || IsAlternate)
        {
            RoomTracker.MoveToRoom(room);
        }
    }
Пример #2
0
    public override void Interact()
    {
        base.Interact();

        if (GlobalFlags.IsSet(switchable))
        {
            GlobalFlags.SetFlag(flag, !GlobalFlags.IsSet(flag));
        }
        else
        {
            GlobalFlags.SetFlag(flag, true);
        }
    }
Пример #3
0
    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));
    }
Пример #4
0
 void Start()
 {
     setActiveFlag(GlobalFlags.IsSet(activeFlag));
 }