Beispiel #1
0
            }                                                 // skip original method

            static void Postfix(RocketStats __instance, ref float __result)
            {
                RocketStatsOverhaul _this = (RocketStatsOverhaul)__instance;

                __result = _this.GetTotalThrust();
                TryLog(nameof(GetTotalThrust) + ": " + __result);
            }
Beispiel #2
0
            }                                                 // skip original method

            static void Postfix(RocketStats __instance, ref float __result)
            {
                RocketStatsOverhaul _this = (RocketStatsOverhaul)__instance;

                __result = _this.GetRocketMaxDistance();
                TryLog(nameof(GetRocketMaxDistance) + ": " + __result);
            }
Beispiel #3
0
            }                                                 // 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);
 }
Beispiel #5
0
//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>();
        }
    }
Beispiel #7
0
 private void Start()
 {
     instance = instance ?? this;
     StartingInitiation();
 }
Beispiel #8
0
 //private int firstLineCounter;
 //private int secondLineCounter;
 //private int thirdLineCounter;
 //private int fourthLineCounter;
 //private int fifthLineCounter;
 private void Awake()
 {
     instance = instance ?? this;
 }