public ObservableCollection <CharacterActionGroup> GetStandardCharacterActionGroup(ManagedCharacter character) { var actionGroup = new ObservableCollection <CharacterActionGroup>(); var identitiesGroup = new CharacterActionListImpl <Identity>(CharacterActionType.Identity, character.Generator, character); identitiesGroup.Name = "Identities"; //Identity newId = identitiesGroup.AddNew(new IdentityImpl()) as Identity; IdentityImpl newId = new IdentityImpl(); newId.Owner = null; newId.Name = "Identity"; newId.Type = SurfaceType.Costume; newId.Surface = "Identity"; newId.Generator = character.Generator; identitiesGroup.AddNew(newId); identitiesGroup.Active = newId; actionGroup.Add(identitiesGroup); var abilitiesGroup = new CharacterActionListImpl <AnimatedAbility.AnimatedAbility>(CharacterActionType.Ability, character.Generator, character); abilitiesGroup.Name = "Powers"; actionGroup.Add(abilitiesGroup); var movementsGroup = new CharacterActionListImpl <CharacterMovement>(CharacterActionType.Movement, character.Generator, character); movementsGroup.Name = "Movements"; actionGroup.Add(movementsGroup); return(actionGroup); }
public override CharacterAction Clone() { Identity clone = new IdentityImpl(((ManagedCharacter)Owner), Name, Surface, Type, Generator, KeyboardShortcut); if (this.AnimationOnLoad != null) { clone.AnimationOnLoad = this.AnimationOnLoad.Clone() as AnimatedAbility.AnimatedAbility; } return(clone); }
private Identity GetNewIdentity() { IdentityImpl identity = new IdentityImpl(); identity.Name = GetNewValidActionName(); identity.Type = SurfaceType.Costume; identity.Surface = identity.Name; identity.Generator = this.Generator; return(identity); }
private void CreateIdentityActionGroup() { var identitiesGroup = new CharacterActionListImpl <Identity>(CharacterActionType.Identity, Generator, this); identitiesGroup.Name = IDENTITY_ACTION_GROUP_NAME; Identity newId = new IdentityImpl(); newId.Owner = this; newId.Name = Name; newId.Type = SurfaceType.Costume; newId.Surface = Name; newId.Generator = this.Generator; identitiesGroup.AddNew(newId); identitiesGroup.Active = newId; this.CharacterActionGroups.Add(identitiesGroup); }