太空工程师吧 关注:37,224贴子:512,068
  • 1回复贴,共1

求助 关于IMyIntergridCommunicationSystem

取消只看楼主收藏回复

在尝试操纵天线。TransmitMessage方法提示已经被IMyIntergridCommunicationSystem对像取代。
但是看天线方块的接口
public interface IMyRadioAntenna : IMyFunctionalBlock, IMyTerminalBlock, IMyCubeBlock, IMyEntity{
[Obsolete("Use IMyIntergridCommunicationSystem instead")]
bool TransmitMessage(string message, MyTransmitTarget target = 3);
float Radius { get; set; }
bool ShowShipName { get; set; }
bool IsBroadcasting { get; }
bool EnableBroadcasting { get; set; }
long AttachedProgrammableBlock { get; set; }
bool IgnoreAlliedBroadcast { get; set; }
bool IgnoreOtherBroadcast { get; set; }
string HudText { get; set; }}
没有哪条是返回IMyIntergridCommunicationSystem的。
请问我应该怎么获得IMyIntergridCommunicationSystem对像?


IP属地:浙江1楼2019-03-24 13:12回复
    编程块呀
    写了段代码,对一个天线方块使用TransmitMessage方法,提示我这个方法已经作废,要我用IMyIntergridCommunicationSystem替换
    查了一下码云上的文档,发现天线方法接口里没一个方法或属性是返回IMyIntergridCommunicationSystem的。
    所以我应该怎么获得IMyIntergridCommunicationSystem?


    IP属地:浙江3楼2019-03-24 13:40
    回复