public static IAudioDeviceList createAudioDeviceList(IDeviceType deviceType) { IntPtr cPtr = cAudioCSharpWrapperPINVOKE.createAudioDeviceList__SWIG_0((int)deviceType); IAudioDeviceList ret = (cPtr == IntPtr.Zero) ? null : new IAudioDeviceList(cPtr, false); return(ret); }
//Called on the first frame in which the script is active // (Often the first frame of the application) void Start() { //speed = 1.0f; //This would always reset speed to 1, regardless of value entered in Inspector //Count of objects collected //****** NB: displayed in UI Text component, //****** which must be a child of a Canvas to display properly // //Set Text anchor to Top Left (Anchor Presets view under Inspector>Rect transform) // also set Pivot(Shift key) and Position(Alt key) // //***** NB: Set both Horiz and Vert Overflow to "Overflow" (instead of Wrap or Truncate) //***** in order to see full text if it is too long for text box ... count = 0; UpdateStatsDisplay(); //winText.text = ""; //see "Bonus, not in tutorial" //Gets attached Rigidbody if there is one rb = GetComponent <Rigidbody>(); if (rb == null) { throw new System.Exception("No RigidBody attached to Component"); } //Bonus, not in tutorial deviceType = DeviceTypeFactory.getDeviceType(); //TODO: place in separate object string devicename = deviceType.ToString(); winText.text = "applem34 Demo:\n" + devicename.TrimStart("Assets.Scripts.".ToCharArray()); }
public static IAudioDeviceList createAudioDeviceList(IDeviceType deviceType) { IntPtr cPtr = cAudioCSharpWrapperPINVOKE.createAudioDeviceList__SWIG_0((int)deviceType); IAudioDeviceList ret = (cPtr == IntPtr.Zero) ? null : new IAudioDeviceList(cPtr, false); return ret; }
///// <summary> ///// ��IP�����豸���� ///// </summary> ///// <param name="deviceIP">�豸���ͱ��</param> ///// <returns></returns> //public IDeviceType FindByIP(string deviceIP) //{ // foreach (IDeviceType deviceType in List) // { // if (deviceType.DeviceIP == deviceIP) // { // return deviceType; // } // } // return null; //} /// <summary> /// �� /// </summary> /// <param name="deviceTypeID">�豸����ID</param> /// <param name="deviceType">�豸����</param> /// <returns></returns> public bool UpdateByID(int deviceTypeID, IDeviceType deviceType) { if (deviceType == null) throw new ArgumentNullException("device" + "�豸�����б���ʱ�豸����Ϊ��"); IDeviceType _device = FindByID(deviceTypeID); if (_device != null) { // ReSharper disable RedundantAssignment deviceType = _device; // ReSharper restore RedundantAssignment return true; } // ReSharper disable RedundantIfElseBlock else // ReSharper restore RedundantIfElseBlock { return false; } }
/// <summary> /// ����豸���� /// </summary> /// <param name="deviceType">�豸����</param> public void Add(IDeviceType deviceType) { Num = List.Add(deviceType); }
/// <summary> /// constructor de la clase /// </summary> /// <param name="deviceType"></param> public DeviceTypeController(IDeviceType deviceType) => _deviceType = deviceType;