コード例 #1
0
        public void ReparentFlippers(PrimitiveComponent primitive, GameObject gameObject, ref GameObject parent)
        {
            PatcherUtil.Reparent(gameObject, parent);

            primitive.Position   = Vector3.zero;
            primitive.Rotation.y = 0;
        }
コード例 #2
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;
        }
コード例 #3
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));;
            }
        }
コード例 #4
0
        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;
        }
コード例 #5
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)));
            }
        }
コード例 #6
0
            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));;
            }
        }
コード例 #7
0
            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));;
            }
        }
コード例 #8
0
        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>(),
            };
        }
コード例 #9
0
ファイル: EditableMesh.cs プロジェクト: jcoder58/Plugins
 ///<summary>Commit Instance</summary>
 public UE4.EditableMesh.EditableMesh CommitInstance(PrimitiveComponent ComponentToInstanceTo) =>
 EditableMesh_methods.CommitInstance_method.Invoke(ObjPointer, ComponentToInstanceTo);
コード例 #10
0
 public override void OnComponentHit(PrimitiveComponent self, PrimitiveComponent comp, Vector impact)
 {
     Log.Debug("[OnComponentHit] : " + self.Actor.Name + " | " + comp.Actor.Name);
 }
コード例 #11
0
 public override void OnComponentEndOverlap(PrimitiveComponent self, PrimitiveComponent comp)
 {
     Log.Debug("[OnComponentEndOverlap] : " + self.Actor.Name + " | " + comp.Actor.Name);
 }
コード例 #12
0
 ///<summary>Adds the component to our list of show-only components.</summary>
 public void ShowOnlyComponent(PrimitiveComponent InComponent) =>
 SceneCaptureComponent_methods.ShowOnlyComponent_method.Invoke(ObjPointer, InComponent);
コード例 #13
0
 ///<summary>Make Editable Mesh</summary>
 public static UE4.EditableMesh.EditableMesh MakeEditableMesh(PrimitiveComponent PrimitiveComponent, int LODIndex) =>
 EditableMeshFactory_methods.MakeEditableMesh_method.Invoke(PrimitiveComponent, LODIndex);
コード例 #14
0
 public PrimitiveSceneProxy(PrimitiveComponent component)
 {
 }