Ejemplo n.º 1
0
        protected virtual void Start()
        {
            if (this.fullBody == null)
            {
                this.fullBody = base.GetComponent <FullBodyBipedIK>();
            }
            if (this.fullBody == null)
            {
                Warning.Log("InteractionSystem can not find a FullBodyBipedIK component", base.transform, false);
                return;
            }
            IKSolverFullBodyBiped expr_4B = this.fullBody.solver;

            expr_4B.OnPreUpdate = (IKSolver.UpdateDelegate)Delegate.Combine(expr_4B.OnPreUpdate, new IKSolver.UpdateDelegate(this.OnPreFBBIK));
            IKSolverFullBodyBiped expr_77 = this.fullBody.solver;

            expr_77.OnPostUpdate    = (IKSolver.UpdateDelegate)Delegate.Combine(expr_77.OnPostUpdate, new IKSolver.UpdateDelegate(this.OnPostFBBIK));
            this.OnInteractionStart = (InteractionSystem.InteractionDelegate)Delegate.Combine(this.OnInteractionStart, new InteractionSystem.InteractionDelegate(this.LookAtInteraction));
            InteractionEffector[] array = this.interactionEffectors;
            for (int i = 0; i < array.Length; i++)
            {
                InteractionEffector interactionEffector = array[i];
                interactionEffector.Initiate(this, this.fullBody.solver);
            }
            this.triggersInRange = new List <InteractionTrigger>();
            this.c = base.GetComponent <Collider>();
            this.UpdateTriggerEventBroadcasting();
            this.initiated = true;
        }
Ejemplo n.º 2
0
        private void OnDestroy()
        {
            if (this.fullBody == null)
            {
                return;
            }
            IKSolverFullBodyBiped expr_1D = this.fullBody.solver;

            expr_1D.OnPreUpdate = (IKSolver.UpdateDelegate)Delegate.Remove(expr_1D.OnPreUpdate, new IKSolver.UpdateDelegate(this.OnPreFBBIK));
            IKSolverFullBodyBiped expr_49 = this.fullBody.solver;

            expr_49.OnPostUpdate    = (IKSolver.UpdateDelegate)Delegate.Remove(expr_49.OnPostUpdate, new IKSolver.UpdateDelegate(this.OnPostFBBIK));
            this.OnInteractionStart = (InteractionSystem.InteractionDelegate)Delegate.Remove(this.OnInteractionStart, new InteractionSystem.InteractionDelegate(this.LookAtInteraction));
        }