Example #1
0
 public SetOperationForComponentTypeInInstantiateNodeAction(InstantiateNodeModel model, TypeHandle componentType,
                                                            ComponentOperation.ComponentOperationType operation)
 {
     Model         = model;
     ComponentType = componentType;
     Operation     = operation;
 }
Example #2
0
        public void TestSetComponentOperation(ComponentOperation.ComponentOperationType operationType)
        {
            //Prepare
            var translateTypeHandle = typeof(Translation).GenerateTypeHandle(Stencil);
            var instantiate         = GraphModel.CreateNode <InstantiateNodeModel>("instantiateNode", Vector2.zero);

            //Act
            instantiate.SetComponentOperation(translateTypeHandle, operationType);

            //Validate
            Assert.That(instantiate.GetEditableComponents().Single().Type, Is.EqualTo(translateTypeHandle));
            Assert.That(instantiate.GetEditableComponents().Single().OperationType, Is.EqualTo(operationType));
        }
Example #3
0
        void SetComponentOperation(TypeHandle componentType, ComponentOperation.ComponentOperationType newValue)
        {
            var action = new SetOperationForComponentTypeInInstantiateNodeAction(Model, componentType, newValue);

            m_Store.Dispatch(action);
        }