1234567891011121314151617181920212223242526 |
- import {Il2cppHackerApi} from "../hacker/Il2cppHackerApi";
- import {log, logHHex} from "../../logger";
- import {ProcessUtils} from "../../sausage/utils/ProcessUtils";
- import {UnityObject} from "./UnityObject";
- import {UnityVector3} from "./UnityVector3";
- export class UnityTransform extends UnityObject {
- get_localPosition() {
- let methodAddr = Il2cppHackerApi.getMethodAddr("UnityEngine.CoreModule.dll", "UnityEngine",
- "Transform", "get_localPosition", 0);
- let nativeFunction = new NativeFunction(methodAddr, "pointer", ['pointer']);
- return nativeFunction(this);
- }
- get_position() {
- let methodAddr = Il2cppHackerApi.getMethodAddr("UnityEngine.CoreModule.dll", "UnityEngine",
- "Transform", "get_position", 0);
- log("get_position:" + (methodAddr - ProcessUtils.getAddr()).toString(16));
- let nativeFunction = new NativeFunction(methodAddr, "float", ['pointer']);
- let s = nativeFunction(this);
- return s;
- }
- }
|