示例#1
0
        public static void RestoreDragDropCommands(string s)
        {
            if (string.IsNullOrEmpty(s))
            {
                return;
            }
            var commands = JsonUtility.FromJson <DragDropCommands>(s);

            audioDragDropCommand               = commands.audioDragDropCommand;
            gameObjectDragDropCommand          = commands.gameObjectDragDropCommand;
            alternateGameObjectDragDropCommand = commands.alternateGameObjectDragDropCommand;
        }
示例#2
0
        private static string GetCurrentGameObjectCommand(GameObjectDragDropCommand command, string goName)
        {
            if (string.IsNullOrEmpty(goName))
            {
                return(string.Empty);
            }
            switch (command)
            {
            default:
            case GameObjectDragDropCommand.Camera:
                return("Camera(default," + goName + ")");

            case GameObjectDragDropCommand.DOF:
                return("DOF(" + goName + ")");

            case GameObjectDragDropCommand.SetActiveTrue:
                return("SetActive(" + goName + ",true)");

            case GameObjectDragDropCommand.SetActiveFalse:
                return("SetActive(" + goName + ",false)");
            }
        }
示例#3
0
 private static void SetAlternateGameObjectDragDropCommand(object data)
 {
     alternateGameObjectDragDropCommand = (GameObjectDragDropCommand)data;
 }
示例#4
0
 private static void SetGameObjectDragDropCommand(object data)
 {
     gameObjectDragDropCommand = (GameObjectDragDropCommand)data;
 }