static void Initialize() { if (!Inited) { TextAPI = new HUDTextAPI(WORKSHOP_ID); } if (!InitedControls) { InitControls(); } }
private void init() { mHud = new HUDTextAPI(591816613); if (Utils.isDev()) { MyAPIGateway.Utilities.ShowMessage("CLIENT", "INIT"); } MyAPIGateway.Utilities.MessageEntered += onMessageEntered; MyAPIGateway.Multiplayer.RegisterMessageHandler(1337, FoodUpdateMsgHandler); }
//Initialises textAPI once for clients, checks if is Server static void Initialize() { if (IsInit) { return; } if ((MyAPIGateway.Multiplayer.IsServer && MyAPIGateway.Utilities.IsDedicated)) { isServer = true; return; } textAPI = new HUDTextAPI(WORKSHOP_ID); }