상속: ActionLibrary.DTOs.ActionDefinitionDTO
        public void AddSocialMove(SocialExchangeDTO newSocialExchange)
        {
            if (_cifAsset.m_SocialExchanges.Find(x=>x.ActionName.ToString() == newSocialExchange.Action) != null)
                _cifAsset.UpdateSocialExchange(newSocialExchange);
            else _cifAsset.AddExchange(newSocialExchange);

              //      SocialExchanges.DataSource = _cifAsset.m_SocialExchanges.ToList();
            //    SocialExchanges.Refresh();
            _mainForm.SetModified();
        }
        public SocialExchange(SocialExchangeDTO s)
            : base(s)
        {
            InfluenceRules = new List<InfluenceRuleDTO>();
            //      Name = s.SocialExchangeName;
            foreach (var inf in s.InfluenceRules)
            {
                InfluenceRules.Add(inf);
            }

            Intent = s.Intent;
            Instantiation = s.Instantiation;
        }
예제 #3
0
        static void Main(string[] args)
        {
            AssetManager.Instance.Bridge = new BasicIOBridge();

            var flirt = new SocialExchangeDTO {Action = "Flirt", Instantiation = "You are so beautiful"};
            var compliment = new SocialExchangeDTO { Action = "Compliment", Instantiation = "You are pretty cool" };

            CommeillFautAsset n = new CommeillFautAsset();
            n.AddExchange(flirt);
            n.AddExchange(compliment);

            RolePlayCharacterAsset npc = RolePlayCharacterAsset.LoadFromFile("../../../Examples/john.rpc");
            Console.WriteLine(npc.CharacterName);

               //     CommeillFautAsset cif;
               //     var flirt_id = cif.AddSocialExchange(flirt);
            //   var compliment_id = cif.AddSocialExchange(compliment);

             //   cif.GetSocialMove(Name.BuildName("Player"));
            Console.ReadLine();
        }
        public void SetData(SocialExchangeDTO dto)
        {
            Intent = dto.Intent;
            Instantiation = dto.Instantiation;

            foreach (var go in dto.InfluenceRules)
            {
                InfluenceRules.Add(go);
            }

            SetFromDTO(dto);
        }