Ejemplo n.º 1
0
        /// <summary>
        /// <para>Events:</para>
        /// <para>@emits icestatechange - (iceState: IceState)</para>
        /// <para>@emits iceselectedtuplechange - (iceSelectedTuple: TransportTuple)</para>
        /// <para>@emits dtlsstatechange - (dtlsState: DtlsState)</para>
        /// <para>@emits sctpstatechange - (sctpState: SctpState)</para>
        /// <para>@emits trace - (trace: TransportTraceEventData)</para>
        /// <para>Observer events:</para>
        /// <para>@emits close</para>
        /// <para>@emits newproducer - (producer: Producer)</para>
        /// <para>@emits newconsumer - (producer: Producer)</para>
        /// <para>@emits newdataproducer - (dataProducer: DataProducer)</para>
        /// <para>@emits newdataconsumer - (dataProducer: DataProducer)</para>
        /// <para>@emits icestatechange - (iceState: IceState)</para>
        /// <para>@emits iceselectedtuplechange - (iceSelectedTuple: TransportTuple)</para>
        /// <para>@emits dtlsstatechange - (dtlsState: DtlsState)</para>
        /// <para>@emits sctpstatechange - (sctpState: SctpState)</para>
        /// <para>@emits trace - (trace: TransportTraceEventData)</para>
        /// </summary>
        /// <param name="loggerFactory"></param>
        /// <param name="transportInternalData"></param>
        /// <param name="sctpParameters"></param>
        /// <param name="sctpState"></param>
        /// <param name="channel"></param>
        /// <param name="payloadChannel"></param>
        /// <param name="appData"></param>
        /// <param name="getRouterRtpCapabilities"></param>
        /// <param name="getProducerById"></param>
        /// <param name="getDataProducerById"></param>
        /// <param name="iceRole"></param>
        /// <param name="iceParameters"></param>
        /// <param name="iceCandidates"></param>
        /// <param name="iceState"></param>
        /// <param name="iceSelectedTuple"></param>
        /// <param name="dtlsParameters"></param>
        /// <param name="dtlsState"></param>
        /// <param name="dtlsRemoteCert"></param>
        public WebRtcTransport(ILoggerFactory loggerFactory,
                               TransportInternalData transportInternalData,
                               SctpParameters?sctpParameters,
                               SctpState?sctpState,
                               Channel channel,
                               PayloadChannel payloadChannel,
                               Dictionary <string, object>?appData,
                               Func <RtpCapabilities> getRouterRtpCapabilities,
                               Func <string, Producer> getProducerById,
                               Func <string, DataProducer> getDataProducerById,
                               string iceRole,
                               IceParameters iceParameters,
                               IceCandidate[] iceCandidates,
                               IceState iceState,
                               TransportTuple?iceSelectedTuple,
                               DtlsParameters dtlsParameters,
                               DtlsState dtlsState,
                               string?dtlsRemoteCert
                               ) : base(loggerFactory, transportInternalData, sctpParameters, sctpState, channel, payloadChannel, appData, getRouterRtpCapabilities, getProducerById, getDataProducerById)
        {
            _logger = loggerFactory.CreateLogger <WebRtcTransport>();

            // Data
            IceRole          = iceRole;
            IceParameters    = iceParameters;
            IceCandidates    = iceCandidates;
            IceState         = iceState;
            IceSelectedTuple = iceSelectedTuple;
            DtlsParameters   = dtlsParameters;
            DtlsState        = dtlsState;
            DtlsRemoteCert   = dtlsRemoteCert;

            HandleWorkerNotifications();
        }
Ejemplo n.º 2
0
 void OnCollisionEnter2D(Collision2D other)
 {
     if(other.gameObject.tag == "Coin")
     {
         //other.gameObject.tag = "HittedCoin";
         switch (icestate) {
         case IceState.Full:
             spriteRenderer.sprite = BreakedIce;
             icestate = IceState.Breaked;
             break;
         case IceState.Breaked:
             blinkIce = true;
             icestate = IceState.Full;
             break;
         default:
             break;
         }
     }
 }
Ejemplo n.º 3
0
 //    void OnCollisionExit2D(Collision2D other)
 //    {
 //        if(other.gameObject.tag == "HittedCoin")
 //        {
 //            other.gameObject.tag = "Coin";
 //        }
 //    }
 void Awake()
 {
     spriteRenderer = GetComponent<SpriteRenderer>();
     icestate = IceState.Full;
 }