protected internal override void RecieveData(IDataReciever reciever)
 {
     if (reciever is IIsLadderRec r)
     {
         r.IsLadder = isLadder;
     }
 }
Пример #2
0
 protected internal override void RecieveData(IDataReciever reciever)
 {
     if (reciever is ISneekCallbackRec r)
     {
         r.OnSneek += () => OnSneekEvent.Invoke();
     }
 }
Пример #3
0
 protected internal override void RecieveData(IDataReciever reciever)
 {
     if (reciever is IMatVelocityRec r)
     {
         r.MovingVelocity = MovingVelocity;
     }
 }
Пример #4
0
 protected internal override void RecieveData(IDataReciever reciever)
 {
     if (reciever is IBlackLiliumReciever r && IsDead)
     {
         r.BlackLiliumReference = this;
     }
 }
Пример #5
0
 protected internal override void RecieveData(IDataReciever reciever)
 {
     if (reciever is ILiliumReciever r && HasLilium)
     {
         r.LiliumReference = this;
     }
 }
Пример #6
0
 protected internal override void RecieveData(IDataReciever reciever)
 {
     if (reciever is IDamageRec r)
     {
         r.IsDamage = true;
     }
 }
 protected internal override void RecieveData(IDataReciever reciever)
 {
     if (reciever is IPlayerIsJumpableSubProp jumpRec)
     {
         jumpRec.IsJumpableInAir = IsJumpableInAir;
     }
 }
Пример #8
0
 protected internal override void RecieveData(IDataReciever reciever)
 {
     if (reciever is IJumpCallbackRec rec)
     {
         rec.OnJump += () => { OnJumpEvent.Invoke(); };
     }
 }
Пример #9
0
 protected internal override void RecieveData(IDataReciever reciever)
 {
     if (reciever is IGravityRec r)
     {
         r.Gravity     += Gravity;
         r.FallDamping += FallDamping;
     }
 }
Пример #10
0
 protected internal override void RecieveData(IDataReciever reciever)
 {
     if (reciever is IDashCenteredRedirectorRec r)
     {
         r.GlobalDashTurningCenter = (Vector2)transform.position + TurningCenter;
         r.DashDeltaTurningAngle   = TurningAngle;
     }
 }
Пример #11
0
 protected internal override void RecieveData(IDataReciever reciever)
 {
     if (reciever is IDashRedirectorRec r)
     {
         r.TargetDashAngle   = TargetDashAngle;
         r.DashTurningRadius = TurningRadius;
     }
 }
Пример #12
0
 protected internal override void RecieveData(IDataReciever reciever)
 {
     if (reciever is IPlayerJumpRec jumpRec)
     {
         jumpRec.JumpSpeed       += JumpSpeed;
         jumpRec.JumpSpeedCutter += JumpSpeedCutter;
     }
 }
Пример #13
0
 protected internal override void RecieveData(IDataReciever reciever)
 {
     if (reciever is IMatBounceRec r)
     {
         r.BounceSettings = BounceSettings;
         r.OnBounce      += () => { OnBounceEvent.Invoke(); };
     }
 }
Пример #14
0
 protected internal override void RecieveData(IDataReciever reciever)
 {
     if (reciever is IPlayerCrouchLocomotionRec r)
     {
         r.RunCrouchAccelCurve   += RunCrouchAccelCurve;
         r.RunCrouchDeaccelCurve += RunCrouchDeaccelCurve;
     }
 }
Пример #15
0
 public virtual void RecieveData(IDataReciever dataReciever)
 {
     //Debug.Log("Recieve Data Props: " + SubstanceProperties.Length);
     foreach (var prop in SubstanceProperties)
     {
         prop.RecieveData(dataReciever);
     }
 }
Пример #16
0
        public void RecieveDataAndReset(IDataReciever dataReciever)
        {
            foreach (var substance in substances)
            {
                substance.RecieveData(dataReciever);
            }

            substances.Clear();
        }
Пример #17
0
 protected internal override void RecieveData(IDataReciever reciever)
 {
     if (reciever is IPlayerDashRec r)
     {
         r.DashDurration        += DashDurration;
         r.DashSpeed            += DashSpeed;
         r.DashRecoverDurration += DashRecoverDurration;
     }
 }
Пример #18
0
 public VirtualSensor(IDataReciever <JointsOfInterestData> kinectPosData)
 {
     KinectPosData = kinectPosData;
     X_derivation  = new Derivative();
     Y_derivation  = new Derivative();
     Z_derivation  = new Derivative();
     pos           = new double[] { 0, 0, 0 };
     IsGood        = true;
 }
Пример #19
0
 protected internal override void RecieveData(IDataReciever reciever)
 {
     if (!wasTriggered)
     {
         wasTriggered = true;
         onStartBreaking?.Invoke();
         TimeSystem.Delay(delayTime, t => Break());
     }
 }
Пример #20
0
 protected internal override void RecieveData(IDataReciever reciever)
 {
     if (reciever is IPlayerLocomotionRec r)
     {
         r.RunAccelCurve           += RunAccelCurve;
         r.RunDeaccelCurve         += RunDeaccelCurve;
         r.RunAccelAirborneCurve   += RunAccelAirborneCurve;
         r.RunDeaccelAirborneCurve += RunDeaccelAirborneCurve;
     }
 }
 public UserAuthenticator(IDataReciever reciever)
 {
     InitializeComponent();
     Reciever  = reciever;
     SchemeMap = new Dictionary <UserAuthenticationScheme, Action>
     {
         [BasicAuthentication]       = DoBasicAuth,
         [FaceAuthentication]        = DoFaceAuth,
         [FingerprintAuthentication] = DoFingerprintAuth
     };
 }
Пример #22
0
 protected internal override void RecieveData(IDataReciever reciever)
 {
     if (reciever is IPlayerClimbingRec r)
     {
         r.ClimbingLadderSpeed           += ClimbingLadderSpeed;
         r.ClimbingWallSlideSpeed        += ClimbingWallSlideSpeed;
         r.ClimbingWallExhaustSlideSpeed += ClimbingWallExhaustSlideSpeed;
         r.ClimbingWallExhaustDurration  += ClimbWallExhaustDurration;
         r.ClimbingWallJumpVelocity      += ClimbingWallJumpVelocity;
     }
 }
Пример #23
0
        public Merge(IDataReciever <VirtualSensorData> idealsensor, IDataReciever <InertialSensorData> actualsensor)
        {
            this.ActualSensor = actualsensor;
            IdealSensor       = idealsensor;

            ActualSensor.NewTData += MyFunctionToDealWithGettingData;
            IdealSensor.NewTData  += OnIdealSensorNewTData;
            virtualAcc             = new CircularBuffer <AccelerationTime>(KinectFPS * CalibrationLookBackTimeInSec);     //kinect
            actualAcc              = new CircularBuffer <AccelerationTime>(InertialMPS * CalibrationLookBackTimeInSec);   //sensor
            calibrators            = new CircularBuffer <SensorCalibrator>(KinectFPS * CalibrationLookBackTimeInSec - 4); //calibrators
            finalCalibrator        = new SensorCalibrator();
        }
        public UserCreatorData(IDataReciever reciever)
        {
            Reciever        = reciever;
            FingerprintData = new UserCreatorFingerprintData
            {
                MainObject = new MainObject()
            };
            FaceData = new UserCreatorFaceData
            {
                RecognitionSchemeData = new RecognitionSchemeData()
            };

            FaceData.RecognitionForm = new FaceRecognition.RecognitionForm(5, (FaceRecognitionSchemes.RegistrationScheme, FaceData.RecognitionSchemeData));
        }
Пример #25
0
        protected internal override void RecieveData(IDataReciever reciever)
        {
            if (Effects == null || Effects.Length == 0)
            {
                Debug.Log("You have to asign at least one effect the material so it will do anything");
                return;
            }

            if (reciever is ITriggerEffectRec r)
            {
                foreach (string e in Effects)
                {
                    r.TriggerEffects.Add(e);
                }
            }
        }
        protected internal override void RecieveData(IDataReciever reciever)
        {
            if (string.IsNullOrEmpty(EffectMaterial))
            {
                Debug.Log("You have to specifie an effect material");
                return;
            }
            if (Effects.Length == 0)
            {
                Debug.Log("You have to asign at least one effect the material so it will do anything");
                return;
            }

            if (reciever is IEffectsMaterialRec r)
            {
                foreach (var e in Effects)
                {
                    if (!string.IsNullOrEmpty(e))
                    {
                        r.EffectMaterials[e] = EffectMaterial;
                    }
                }
            }
        }
Пример #27
0
 internal protected abstract void RecieveData(IDataReciever reciever);
Пример #28
0
        // тут будут не только последние данные, а несколько предыдущих снапшотов. В PoC предлагаю брать только последние
        //private Dictionary<string, double> lastCatchedData = new Dictionary<string, double>();

        public DataWriter(IDataContext ctx, IDataReciever rcvr)
        {
            reciever  = rcvr;
            DbContext = ctx;
        }