Beispiel #1
0
        public static bool Prefix(ref Oxygen __instance)
        {
            if (!__instance.isPlayer)
            {
                if (__instance.gameObject.GetComponent <CustomOxy>() == null)
                {
                    Logger.Log(Logger.Level.Debug, $"Adding CustomOxy component to instance {__instance.ToString()}");
                    __instance.gameObject.EnsureComponent <CustomOxy>();
                }
                else
                {
                    Logger.Log(Logger.Level.Debug, $"CustomOxy already present on instance {__instance.ToString()}");
                }
                return(false);
            }

            return(true);
        }
Beispiel #2
0
 public void logStatus()
 {
     Console.WriteLine("Number of Elements: " + Elements.Count.ToString() +
                       " / Oxygen: " + Oxygen.ToString() +
                       " / Battery: " + Battery.ToString());
 }