public List <TreeNode> RenderInScriptManager(string code) { List <TreeNode> list = new List <TreeNode>(); TreeNode node = new TreeNode(); TreeViewColorTool TextColor = new TreeViewColorTool(); string activated = "deactivated"; if (Loop) { activated = "activated"; } VO_PlayableCharacter playableCharacter = GameCore.Instance.GetPlayableCharacterById(Character); TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_ORANGE, "Change"); TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " player "); TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, "[" + playableCharacter.Title + "]"); TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " animation of type "); TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, "[" + AnimationType.GetDescription() + "]"); TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " to "); TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, "[" + GameCore.Instance.GetCharAnimationById(playableCharacter.CharacterId, Animation).Title + "]"); TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, ", loop "); TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, "[" + activated + "]"); node.Text = TextColor.GetJsonisedObject(); node.Name = code; node.Tag = this; list.Add(node); return(list); }
public VO_PlayableCharacter Clone() { VO_PlayableCharacter character = (VO_PlayableCharacter)this.MemberwiseClone(); character.Actions = new List <Guid>(); character.Items = new List <Guid>(); foreach (Guid guid in Actions) { character.Actions.Add(guid); } foreach (Guid guid in Items) { character.Items.Add(guid); } return(character); }
public bool IsScriptValid() { VO_PlayableCharacter playableCharacter = GameCore.Instance.GetPlayableCharacterById(Character); bool IsValid = true; if (ValidationTools.CheckObjectExistence(playableCharacter) == false) { Character = Guid.Empty; IsValid = false; } if (ValidationTools.CheckObjectExistence(GameCore.Instance.GetCharAnimationById(playableCharacter.CharacterId, Animation)) == false) { Animation = Guid.Empty; IsValid = false; } return(IsValid); }