Example #1
0
 private void OnEventDiconnected(EventCustom e)
 {
     _authed = false;
     if (_ctx.Logined)
     {
         _ctx.GateAuth();
     }
 }
Example #2
0
        //частное
        public static ComplexNum ComplexDivision(ComplexNum A, ComplexNum B)
        {
            var resultComplex = new ComplexNum();

            if (Math.Abs(B._real * B._real + B._imaginary * B._imaginary) < Eps || Math.Abs(B._real * B._real + B._imaginary * B._imaginary) < Eps)
            {
                var obj = new EventCustom(A, B);
                DivisionZero(obj);
            }
            resultComplex._real      = (A._real * B._real + A._imaginary * B._imaginary) / (B._real * B._real + B._imaginary * B._imaginary);
            resultComplex._imaginary = (B._real * A._imaginary - A._real * B._imaginary) / (B._real * B._real + B._imaginary * B._imaginary);
            return(resultComplex);
        }
Example #3
0
//$=============================================================================
//@ Sets up a custom user event
//@
//@ Parameters:
//@
//# iego		- EchoGameObject that will have this EchoFXEvent
//# itime       - Start time
//# iduration   - Duration of the effect
//# icallback   - Callback that processes this effect
//&=============================================================================
    public static EchoFXEvent StartEventCustom(EchoGameObject iego, float itime, float iduration, EventCustom icallback)
    {
        EchoFXEvent efx;

        efx = PoolGetFreeInactive(poolListID) as EchoFXEvent;

        if (efx != null)
        {
            efx.echoFilter    = EchoFilter.LINEAR;
            efx.fxAmplitude   = 1.0f;
            efx.fxPeriod      = 1.0f;
            efx.fxOffset      = 0.0f;
            efx.eventType     = EchoET.CUSTOM;
            efx.ego           = iego;
            efx.fxDuration    = iduration;
            efx.fxTime        = itime;
            efx.fxEventCustom = icallback;
        }

        return(efx);
    }
Example #4
0
 private void OnEventLogout(EventCustom e)
 {
     _authed = false;
 }
Example #5
0
 private void OnEventAuthed(EventCustom e)
 {
     _authed = true;
 }