コード例 #1
0
 public override bool combine(Tool other)
 {
     if (other is ChangeDescriptionTool)
     {
         ChangeDescriptionTool cnt = (ChangeDescriptionTool)other;
         if (cnt.described == described && cnt.oldDescription == description)
         {
             description = cnt.description;
             timeStamp   = cnt.timeStamp;
             return(true);
         }
     }
     return(false);
 }
コード例 #2
0
        /**
         * Sets the description of the adventure.
         *
         * @param description
         *            New description for the adventure
         */
        public void setDescription(string description)
        {
            Tool tool = new ChangeDescriptionTool(adventureData, description);

            Controller.getInstance().addTool(tool);
        }
コード例 #3
0
        /**
         * Sets the new description of the chapter.
         *
         * @param description
         *            Description of the chapter
         */
        public void setDescription(string description)
        {
            ChangeDescriptionTool tool = new ChangeDescriptionTool(chapter, description);

            controller.addTool(tool);
        }