示例#1
0
 private void ComponentChange(IDataStream <long> sender, EntityChangedArgs <long> args)
 {
     if (args.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Add)
     {
         Entities[args.Entity].Add(sender);
     }
     if (args.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Remove)
     {
         Entities[args.Entity].Remove(sender);
     }
 }
示例#2
0
        private void ComponentSystems_DataStreamChanged(IDataStream <string> sender, EntityChangedArgs <string> args)// DSChangedArgs<string, IDataStream<long>> args)
        {
            var myargs = args as DSChangedArgs <string, IDataStream <long> >;

            if (myargs.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Add)
            {
                myargs.NewVal.DataStreamChanged += ComponentChange;
            }
            else if (args.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Remove)
            {
                myargs.NewVal.DataStreamChanged -= ComponentChange;
            }
        }
示例#3
0
 private void DataStream_DataStreamChanged(IDataStream <Key> sender, EntityChangedArgs <Key> args)
 {
 }