示例#1
0
 private void buttonCreateObject_Click(object sender, EventArgs e)
 {
     if (comboBoxMethodName.SelectedItem is FactoryMethodSelectionItem factoryMethod && comboBoxClassName.SelectedItem is FactoryClassSelectionItem factoryClass)
     {
         object result = factoryMethod.FactoryMethod.Invoke(Activator.CreateInstance(factoryClass.FactoryClass), argumentTable.Arguments.ToArray());
         ObjectCreated?.Invoke(this, result);
     }
 }
示例#2
0
 public void Fire_ObjectCreated(StorageContext context, T obj)
 {
     ObjectCreated?.Invoke(context, new ObjectEventArgs <T>(obj));
 }
示例#3
0
 public void OnObjectCreated(GameObject @object) => ObjectCreated?.Invoke(@object, EventArgs.Empty);
示例#4
0
文件: SyncNode.cs 项目: tana/Mondeto
 protected void InvokeObjectCreated(uint objId) => ObjectCreated?.Invoke(objId);
示例#5
0
 void InvokeObjectCreated(object created)
 {
     ObjectCreated?.Invoke(created);
 }
示例#6
0
 public ImgGalaxy(int id, Point pos, Point dir, int energy) : base(id, pos, dir, new Size(0, 0), energy)
 {
     image = Image.FromFile($"Resources/galaxy{Game.r.Next(4) + 1}.jpg");
     OSize = new Size(image.Width, image.Height);
     ObjectCreated?.Invoke($"New galaxy created {id}, ({Pos.X},{Pos.Y}), speed: ({dir.X},{dir.Y})");
 }
 void InvokeObjectCreated(object obj)
 {
     ObjectCreated?.Invoke(obj);
 }
示例#8
0
 public Star(int id, Point pos, Point dir, Size size, int energy) : base(id, pos, dir, size, energy)
 {
     ObjectCreated?.Invoke($"New star created {id}, ({Pos.X},{Pos.Y}), speed: ({dir.X},{dir.Y})");
 }