Exemple #1
0
    // Token: 0x06000105 RID: 261 RVA: 0x00007CFC File Offset: 0x00005EFC
    private int FindBestStepEffect(FootStep.GroundMaterial material, FootStep.MotionType motion)
    {
        FootStep.StepEffect stepEffect = null;
        int result = -1;

        for (int i = 0; i < this.m_effects.Count; i++)
        {
            FootStep.StepEffect stepEffect2 = this.m_effects[i];
            if (((stepEffect2.m_material & material) != FootStep.GroundMaterial.None || (stepEffect == null && (stepEffect2.m_material & FootStep.GroundMaterial.Default) != FootStep.GroundMaterial.None)) && (stepEffect2.m_motionType & motion) != (FootStep.MotionType) 0)
            {
                stepEffect = stepEffect2;
                result     = i;
            }
        }
        return(result);
    }
Exemple #2
0
    // Token: 0x060000FE RID: 254 RVA: 0x00007880 File Offset: 0x00005A80
    private void OnFoot(Transform foot)
    {
        if (!this.m_nview.IsValid())
        {
            return;
        }
        Vector3 vector = (foot != null) ? foot.position : base.transform.position;

        FootStep.MotionType     motionType     = this.GetMotionType(this.m_character);
        FootStep.GroundMaterial groundMaterial = this.GetGroundMaterial(this.m_character, vector);
        int num = this.FindBestStepEffect(groundMaterial, motionType);

        if (num != -1)
        {
            this.m_nview.InvokeRPC(ZNetView.Everybody, "Step", new object[]
            {
                num,
                vector
            });
        }
    }