示例#1
0
    public void ActivateAlarm()
    {
        PuzzleALARM _alarm = AlarmPuzzle.GetComponent <PuzzleALARM>();

        if (hasAlarmedOnce)
        {
            int actualChance = Random.Range(0, 100);
            if (actualChance >= 50)
            {
                _alarm.Toggle();
            }
        }
        else
        {
            _alarm.Toggle();
        }

        hasAlarmedOnce = true;
    }
示例#2
0
    public void ActivateAlarm(bool forceIt = false)
    {
        PuzzleALARM _alarm = AlarmPuzzle.GetComponent <PuzzleALARM>();

        if (forceIt)
        {
            _alarm.Toggle();
        }
        else
        {
            ActivateAlarm();
        }

        hasAlarmedOnce = true;
    }