} // skip original method static void Postfix(RocketStats __instance, ref float __result) { RocketStatsOverhaul _this = (RocketStatsOverhaul)__instance; __result = _this.GetTotalThrust(); TryLog(nameof(GetTotalThrust) + ": " + __result); }
} // skip original method static void Postfix(RocketStats __instance, ref float __result) { RocketStatsOverhaul _this = (RocketStatsOverhaul)__instance; __result = _this.GetRocketMaxDistance(); TryLog(nameof(GetRocketMaxDistance) + ": " + __result); }
} // skip original method static void Postfix(RocketStats __instance, ref float __result) { RocketStatsOverhaul _this = (RocketStatsOverhaul)__instance; __result = _this.GetAverageOxidizerEfficiency(); TryLog(nameof(GetAverageOxidizerEfficiency) + ": " + __result); }
protected override void OnPrefabInit() { base.OnPrefabInit(); characterOverlay = base.gameObject.AddComponent <CharacterOverlay>(); characterOverlay.Register(); rocketStats = new RocketStats(this); }
//Method called when all the objects in the scene are loaded. void Start() { //Getting components of the rocket's root audioSource = GetComponent <AudioSource> (); stats = GetComponent <RocketStats>(); //initial checkpoint on initial position checkPoint = transform.localPosition; fuelCheckPoint = 100; }
//Method called when all the objects in the scene are loaded. void Start() { //Getting components of the rocket's root. rigidBody = GetComponent <Rigidbody>(); audioSource = GetComponent <AudioSource>(); stats = GetComponent <RocketStats>(); //Set rotation transform constraint on the z axis to prevent undesired rotations when landing on a checkpoint/landing platform rigidBody.constraints = RigidbodyConstraints.FreezeRotationY; rigidBody.constraints = RigidbodyConstraints.FreezePositionZ; //Getting components of the mobile UI if mobile platform. if (Application.isMobilePlatform) { BMobileThrust = GameObject.Find("ThrustMovementMobile").GetComponent <Button>(); BMobileLeft = GameObject.Find("LeftMovementMobile").GetComponent <Button>(); BMobileRight = GameObject.Find("RightMovementMobile").GetComponent <Button>(); } }
private void Start() { instance = instance ?? this; StartingInitiation(); }
//private int firstLineCounter; //private int secondLineCounter; //private int thirdLineCounter; //private int fourthLineCounter; //private int fifthLineCounter; private void Awake() { instance = instance ?? this; }