public bool API_Unlock(float code) { Door door = actionOtherObject as Door; if (door == null) { D.Log("actionOtherObject is not a Door"); return(false); } return(door.Unlock(code)); }
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)); } }