//----------------------------------------------------------------------------------- private bool CheckIfAllowedEntity(CommandNode cNode) { bool allowedGravity = (field_.AllowedType & CNField.AllowedTypes.GravityNode) == CNField.AllowedTypes.GravityNode; bool allowedExplosion = (field_.AllowedType & CNField.AllowedTypes.ExplosionNode) == CNField.AllowedTypes.ExplosionNode; bool allowedTrigger = (field_.AllowedType & CNField.AllowedTypes.TriggerNode) == CNField.AllowedTypes.TriggerNode; bool allowedParameterModifier = (field_.AllowedType & CNField.AllowedTypes.ParameterModifierNode) == CNField.AllowedTypes.ParameterModifierNode; bool allowedSubstituter = (field_.AllowedType & CNField.AllowedTypes.SubstituterNode) == CNField.AllowedTypes.SubstituterNode; bool allowedAimedForce = (field_.AllowedType & CNField.AllowedTypes.AimedForceNode) == CNField.AllowedTypes.AimedForceNode; bool allowedWind = (field_.AllowedType & CNField.AllowedTypes.WindNode) == CNField.AllowedTypes.WindNode; bool allowedSpeedLimiter = (field_.AllowedType & CNField.AllowedTypes.SpeedLimiter) == CNField.AllowedTypes.SpeedLimiter; bool allowedJet = (field_.AllowedType & CNField.AllowedTypes.Jet) == CNField.AllowedTypes.Jet; if ((allowedGravity && cNode is CNGravity) || (allowedExplosion && cNode is CNExplosion) || (allowedTrigger && cNode is CNTrigger) || (allowedParameterModifier && cNode is CNParameterModifier) || (allowedSubstituter && cNode is CNSubstituter) || (allowedAimedForce && cNode is CNAimedForce) || (allowedWind && cNode is CNWind) || (allowedSpeedLimiter && cNode is CNSpeedLimiter) || (allowedJet && cNode is CNJet) ) { return(true); } return(false); }
//----------------------------------------------------------------------------------- protected override void CloneData(CommandNode node) { base.CloneData(node); CNGravity clone = (CNGravity)node; clone.gravity_ = gravity_; }
//----------------------------------------------------------------------------------- public override CommandNode DeepClone(GameObject dataHolder) { CNCorpuscles clone = CommandNode.CreateInstance <CNCorpuscles>(dataHolder); CloneData(clone); return(clone); }
public override CommandNode DeepClone(GameObject dataHolder) { CNRope clone = CommandNode.CreateInstance <CNRope>(dataHolder); clone.field_ = field_.DeepClone(); clone.Name = Name; clone.mass_ = mass_; clone.density_ = density_; clone.sides_ = sides_; clone.stretch_ = stretch_; clone.bend_ = bend_; clone.torsion_ = torsion_; clone.dampingPerSecond_CM_ = dampingPerSecond_CM_; clone.restitution_in01_ = restitution_in01_; clone.frictionKinetic_in01_ = frictionKinetic_in01_; clone.frictionStatic_in01_ = frictionStatic_in01_; clone.gravity_ = gravity_; clone.dampingPerSecond_WORLD_ = dampingPerSecond_WORLD_; clone.velocityStart_ = velocityStart_; clone.omegaStart_inRadSeg_ = omegaStart_inRadSeg_; return(clone); }
public override CommandNode DeepClone(GameObject dataHolder) { CNTriggerByContact clone = CommandNode.CreateInstance <CNTriggerByContact>(dataHolder); CloneData(clone); return(clone); }
public override CommandNode DeepClone(GameObject dataHolder) { CNCloth clone = CommandNode.CreateInstance <CNCloth>(dataHolder); clone.field_ = field_.DeepClone(); clone.Name = Name; clone.mass_ = mass_; clone.density_ = density_; clone.cloth_bend_ = cloth_bend_; clone.cloth_stretch_ = cloth_stretch_; clone.cloth_dampingBend_ = cloth_dampingBend_; clone.cloth_dampingStretch_ = cloth_dampingStretch_; clone.cloth_collisionRadius_ = cloth_collisionRadius_; clone.restitution_in01_ = restitution_in01_; clone.frictionKinetic_in01_ = frictionKinetic_in01_; clone.frictionStatic_in01_ = frictionStatic_in01_; clone.gravity_ = gravity_; clone.dampingPerSecond_WORLD_ = dampingPerSecond_WORLD_; clone.velocityStart_ = velocityStart_; clone.omegaStart_inRadSeg_ = omegaStart_inRadSeg_; return(clone); }
public override CommandNode DeepClone(GameObject dataHolder) { CNParameterModifier clone = CommandNode.CreateInstance <CNParameterModifier>(dataHolder); CloneData(clone); return(clone); }
public override CommandNode DeepClone(GameObject dataHolder) { CNTessellator clone = CommandNode.CreateInstance <CNTessellator>(dataHolder); CloneData(clone); return(clone); }
protected override void CloneData(CommandNode node) { base.CloneData(node); CNBody clone = (CNBody)node; clone.doCollide_ = doCollide_; clone.isSolidVsShell_ = isSolidVsShell_; clone.mass_ = mass_; clone.density_ = density_; clone.restitution_in01_ = restitution_in01_; clone.frictionKinetic_in01_ = frictionKinetic_in01_; clone.frictionStatic_in01_ = frictionStatic_in01_; clone.fromKinetic_ = fromKinetic_; clone.gravity_ = gravity_; clone.dampingPerSecond_WORLD_ = dampingPerSecond_WORLD_; clone.velocityStart_ = velocityStart_; clone.omegaStart_inRadSeg_ = omegaStart_inRadSeg_; clone.explosionOpacity_ = explosionOpacity_; clone.explosionResponsiveness_ = explosionResponsiveness_; }
//----------------------------------------------------------------------------------- public override CommandNode DeepClone(GameObject dataHolder) { CNScriptPlayer clone = CommandNode.CreateInstance <CNScriptPlayer>(dataHolder); CloneData(clone); return(clone); }
public override CommandNode DeepClone(GameObject dataHolder) { CNHelperMesh clone = CommandNode.CreateInstance <CNHelperMesh>(dataHolder); CloneData(clone); return(clone); }
//----------------------------------------------------------------------------------- public CNFieldView(CNFieldController controller, CommandNodeEditor ownerEditor) { Controller = controller; selectionListBox_ = new CRListBox(Controller, "FieldLB", false); ownerNode_ = ownerEditor.Data; Controller.WantsUpdate += controller.BuildListItems; }
//---------------------------------------------------------------------------------- public override bool RemoveNodeFromFields(CommandNode node) { Undo.RecordObject(Data, "CaronteFX - Remove node from fields"); bool removedFromBodies = Data.Field.RemoveNode(node); bool removedFromAimGameObjects = Data.FieldAimGameObjects.RemoveNode(node); return(removedFromBodies || removedFromAimGameObjects); }
//----------------------------------------------------------------------------------- protected override void CloneData(CommandNode node) { base.CloneData(node); CNCorpuscles clone = (CNCorpuscles)node; clone.corpusclesRadius_ = corpusclesRadius_; }
protected override void CloneData(CommandNode node) { base.CloneData(node); CNTessellator clone = (CNTessellator)node; clone.maxEdgeLength_ = maxEdgeLength_; clone.limitByMeshDimensions_ = limitByMeshDimensions_; }
//----------------------------------------------------------------------------------- protected override void CloneData(CommandNode node) { base.CloneData(node); CNScriptPlayer clone = (CNScriptPlayer)node; clone.simulationScript_ = simulationScript_; }
protected override void CloneData(CommandNode node) { base.CloneData(node); CNEntity clone = (CNEntity)node; clone.timer_ = timer_; }
//----------------------------------------------------------------------------------- private bool IsAllowedNode(CommandNode node) { if (field_.ContentType.IsFlagSet(node.FieldContentType)) { return(true); } return(false); }
//---------------------------------------------------------------------------------- public override bool RemoveNodeFromFields(CommandNode node) { Undo.RecordObject(Data, "CaronteFX - Remove node from fields"); bool removedfromA = Data.FieldA.RemoveNode(node); bool removedFromB = Data.FieldB.RemoveNode(node); return(removedfromA || removedFromB); }
protected override void CloneData(CommandNode node) { base.CloneData(node); CNTriggerByExplosion clone = (CNTriggerByExplosion)node; clone.fieldExplosions_ = fieldExplosions_.DeepClone(); clone.fieldBodies_ = fieldBodies_.DeepClone(); }
protected override void CloneData(CommandNode node) { base.CloneData(node); CNBalltreeGenerator clone = (CNBalltreeGenerator)node; clone.creationMode_ = creationMode_; clone.balltreeLOD_ = balltreeLOD_; clone.balltreePrecision_ = balltreePrecision_; }
//----------------------------------------------------------------------------------- public bool AddNode(CommandNode node) { if (!lCommandNodes_.Contains(node)) { lCommandNodes_.Add(node); return(true); } return(false); }
public override CommandNode DeepClone(GameObject dataHolder) { CNWelder clone = CommandNode.CreateInstance <CNWelder>(dataHolder); clone.field_ = Field.DeepClone(); clone.Name = Name; return(clone); }
//----------------------------------------------------------------------------------- protected override void CloneData(CommandNode node) { base.CloneData(node); CNSpeedLimiter clone = (CNSpeedLimiter)node; clone.speed_limit_ = speed_limit_; clone.falling_speed_limit_ = falling_speed_limit_; }
//----------------------------------------------------------------------------------- private bool CheckIfAllowedMultiJoint(CommandNode cNode) { bool allowedMultiJoint = (field_.AllowedType & CNField.AllowedTypes.MultiJointNode) == CNField.AllowedTypes.MultiJointNode; if (allowedMultiJoint && (cNode is CNJointGroups)) { return(true); } return(false); }
//----------------------------------------------------------------------------------- protected override void CloneData(CommandNode node) { base.CloneData(node); CNRigidbody clone = (CNRigidbody)node; clone.useBallTree_ = useBallTree_; clone.balltreeLOD_ = balltreeLOD_; clone.isFiniteMass_ = isFiniteMass_; }
//----------------------------------------------------------------------------------- private bool CheckIfAllowedServos(CommandNode cNode) { bool allowedServos = (field_.AllowedType & CNField.AllowedTypes.ServosNode) == CNField.AllowedTypes.ServosNode; if (allowedServos && (cNode is CNServos)) { return(true); } return(false); }
//----------------------------------------------------------------------------------- protected override void CloneData(CommandNode node) { base.CloneData(node); CNMonoField clone = (CNMonoField)node; if (field_ != null) { clone.field_ = field_.DeepClone(); } }
protected override void CloneData(CommandNode node) { base.CloneData(node); CNAimedForce clone = (CNAimedForce)node; clone.fieldAimGameObjects_ = fieldAimGameObjects_.DeepClone(); clone.timeDuration_ = timeDuration_; clone.multiplier_r_ = multiplier_r_; clone.multiplier_q_ = multiplier_q_; }
protected override void CloneData(CommandNode node) { base.CloneData(node); CNTriggerByDetector clone = (CNTriggerByDetector)node; clone.fieldA_ = fieldA_.DeepClone(); clone.fieldB_ = fieldB_.DeepClone(); clone.triggerForInvolvedBodies_ = TriggerForInvolvedBodies; }