private void Awake() { if (_instance != null && _instance != this) { Destroy(this.gameObject); } else { _instance = this; } }
public static bool Prefix(DroidManager __instance, ref int[] d) { if (!GadgetNetwork.MatrixReady && GadgetNetwork.GetTimeSinceConnect() < GadgetNetwork.MatrixTimeout) { __instance.StartCoroutine(GadgetUtils.WaitAndInvoke(RPCMethod, GadgetNetwork.MatrixTimeout - GadgetNetwork.GetTimeSinceConnect(), () => GadgetNetwork.MatrixReady, __instance, d)); return(false); } GadgetNetwork.ConvertIDToLocal(ItemRegistry.Singleton, ref d[0]); GadgetNetwork.ConvertIDToLocal(ItemRegistry.Singleton, ref d[1]); GadgetNetwork.ConvertIDToLocal(ItemRegistry.Singleton, ref d[2]); return(true); }
public void SetDroidManager(DroidManager manager) { _droidManager = manager; }