Пример #1
0
        public bool API_Lock(float code)
        {
            Door door = actionOtherObject as Door;

            if (door == null)
            {
                D.Log("actionOtherObject is not a Door");
                return(false);
            }

            return(door.Lock(code));
        }
Пример #2
0
        public bool API_Toggle(float code)
        {
            Door door = actionOtherObject as Door;

            if (door == null)
            {
                D.Log("actionOtherObject is not a Door");
                return(false);
            }

            if (door.isLocked)
            {
                return(door.Unlock(code));
            }
            else
            {
                return(door.Lock(code));
            }
        }