public void ReparentFlippers(PrimitiveComponent primitive, GameObject gameObject, ref GameObject parent) { PatcherUtil.Reparent(gameObject, parent); primitive.Position = Vector3.zero; primitive.Rotation.y = 0; }
public void ReparentFlippers(PrimitiveComponent flipper, GameObject gameObject, ref GameObject parent) { PatcherUtil.Reparent(gameObject, parent); flipper.Position.x = 0; flipper.Position.y = 0; flipper.ObjectRotation.z = 0; }
internal static unsafe void Invoke(IntPtr obj, PrimitiveComponent InComponent) { long *p = stackalloc long[] { 0L, 0L }; byte *b = (byte *)p; *((IntPtr *)(b + 0)) = InComponent; Main.GetProcessEvent(obj, HideComponent_ptr, new IntPtr(p));; } }
public void ReparentFlippers(PrimitiveComponent flipper, GameObject gameObject, ref GameObject parent) { PatcherUtil.Reparent(gameObject, parent); flipper.Position.x = 0; flipper.Position.y = 0; // // rotation is set in the original data, reparenting caused the flippers to be rotated wrong => fixing the rotation flipper.Rotation.y = 0; }
internal static unsafe UE4.EditableMesh.EditableMesh Invoke(PrimitiveComponent PrimitiveComponent, int LODIndex) { long *p = stackalloc long[] { 0L, 0L, 0L, 0L }; byte *b = (byte *)p; *((IntPtr *)(b + 0)) = PrimitiveComponent; *((int *)(b + 8)) = LODIndex; Main.GetProcessEvent(EditableMeshFactory.DefaultObject, MakeEditableMesh_ptr, new IntPtr(p));; return(*((IntPtr *)(b + 16))); } }
internal static unsafe void Invoke(IntPtr obj, PrimitiveComponent Component, Name InBoneName, Vector GrabLocation) { long *p = stackalloc long[] { 0L, 0L, 0L, 0L, 0L }; byte *b = (byte *)p; *((IntPtr *)(b + 0)) = Component; *((Name *)(b + 8)) = InBoneName; *((Vector *)(b + 20)) = GrabLocation; Main.GetProcessEvent(obj, GrabComponentAtLocation_ptr, new IntPtr(p));; } }
internal static unsafe void Invoke(IntPtr obj, PrimitiveComponent Component1, Name BoneName1, PrimitiveComponent Component2, Name BoneName2) { long *p = stackalloc long[] { 0L, 0L, 0L, 0L, 0L, 0L, 0L }; byte *b = (byte *)p; *((IntPtr *)(b + 0)) = Component1; *((Name *)(b + 8)) = BoneName1; *((IntPtr *)(b + 24)) = Component2; *((Name *)(b + 32)) = BoneName2; Main.GetProcessEvent(obj, SetConstrainedComponents_ptr, new IntPtr(p));; } }
public void SetupCannon(GameObject primitiveGo, PrimitiveComponent cannonComp) { var playfieldGo = primitiveGo.GetComponentInParent <PlayfieldComponent>().gameObject; var mechsParent = GetOrCreateGameObject(playfieldGo, "Mechs"); var rotatorGo = CreateEmptyGameObject(mechsParent, "Cannon"); var rotatorComp = rotatorGo.AddComponent <RotatorComponent>(); var mechComp = rotatorGo.AddComponent <StepRotatorMechComponent>(); //mechComp.Target = rotatorComp; mechComp.NumSteps = 240; mechComp.Marks = new[] { new MechMark(MechMarkSwitchType.EnableBetween, "Gun Home", "gun_home_switch", 0, 5), new MechMark(MechMarkSwitchType.EnableBetween, "Gun Mark", "gun_mark_switch", 98, 105), }; rotatorComp.Target = cannonComp; rotatorComp.RotateWith = new IRotatableComponent[] { playfieldGo.transform.Find("Kickers/sw31").GetComponent <KickerComponent>(), }; }
///<summary>Commit Instance</summary> public UE4.EditableMesh.EditableMesh CommitInstance(PrimitiveComponent ComponentToInstanceTo) => EditableMesh_methods.CommitInstance_method.Invoke(ObjPointer, ComponentToInstanceTo);
public override void OnComponentHit(PrimitiveComponent self, PrimitiveComponent comp, Vector impact) { Log.Debug("[OnComponentHit] : " + self.Actor.Name + " | " + comp.Actor.Name); }
public override void OnComponentEndOverlap(PrimitiveComponent self, PrimitiveComponent comp) { Log.Debug("[OnComponentEndOverlap] : " + self.Actor.Name + " | " + comp.Actor.Name); }
///<summary>Adds the component to our list of show-only components.</summary> public void ShowOnlyComponent(PrimitiveComponent InComponent) => SceneCaptureComponent_methods.ShowOnlyComponent_method.Invoke(ObjPointer, InComponent);
///<summary>Make Editable Mesh</summary> public static UE4.EditableMesh.EditableMesh MakeEditableMesh(PrimitiveComponent PrimitiveComponent, int LODIndex) => EditableMeshFactory_methods.MakeEditableMesh_method.Invoke(PrimitiveComponent, LODIndex);
public PrimitiveSceneProxy(PrimitiveComponent component) { }