Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

sours proj im crine, i have all scripts lol, 

using System;

using UnityEngine;

public class FootSystem2 : MonoBehaviour

{

    public LayerMask ground;

    public FootSystem2 otherFoot;

    public float stepDist;

    public float stepHeight;

    public float stepLength;

    public float footSpacing;

    public float speed;

    public Transform body;

    public Vector3 footOffset;

    private Vector3 km;

    private Vector3 kn;

    private Vector3 ko;

    private Vector3 kp;

    private Vector3 kq;

    private Vector3 kr;

    private float ks;

    private void Start()

    {

        this.footSpacing = this.transform.localPosition.x;

        Vector3 position = this.transform.position;

        this.km = position;

        this.kn = position;

        this.ko = position;

        Vector3 up = this.transform.up;

        this.kp.x = up.x;

        this.kp.y = up.y;

        this.kr = up;

        this.kp.z = up.z;

        this.kq = up;

        this.ks = 0x3F800000;

    }

    private void Update()

    {

        Transform transform = this.transform;

        float y = this.ko.y;

        float z = this.ko.z;

        float x = this.ko.x;

        transform.position = new Vector3(x, y, z);

        Transform transform2 = this.transform;

        float y2 = this.kq.y;

        float z2 = this.kq.z;

        float x2 = this.kq.x;

        transform2.up = new Vector3(x2, y2, z2);

        Vector3 position = this.body.position;

        Vector3 right = this.body.right;

        float footSpacing = this.footSpacing;

        Ray ray = new Ray(new Vector3(position.x + right.x * footSpacing, position.y + right.y * footSpacing, position.z + right.z * footSpacing), new Vector3(Vector3.downVector.x, Vector3.downVector.y, Vector3.downVector.z));

        int op_Implicit = LayerMask.op_Implicit(this.ground);

        Ray ray2;

        ray2 = ray;

        RaycastHit raycastHit;

        bool raycast = Physics.Raycast(ray2, out raycastHit, 10f, op_Implicit);

        bool flag;

        if (raycast)

        {

            float x3 = this.ko.x;

            float y3 = this.ko.y;

            float z3 = this.ko.z;

            Vector3 point = raycastHit.point;

            float num = x3 - point.x;

            float num2 = y3 - point.y;

            float num3 = z3 - point.z;

            if (Math.Sqrt(num3 * num3 + (num * num + num2 * num2)) > this.stepDist)

            {

                if (!(this.otherFoot.ks < 1f))

                {

                    if (this.ks >= 1f)

                    {

                        Transform body = this.body;

                        this.ks = 0;

                        Vector3 point2 = raycastHit.point;

                        Vector3 inverseTransformPoint = body.InverseTransformPoint(new Vector3(point2.x, point2.y, point2.z));

                        Transform body2 = this.body;

                        float y4 = this.ko.y;

                        float z4 = this.ko.z;

                        float x4 = this.ko.x;

                        *(float*)(&stack[-0xC0]) = inverseTransformPoint.z - body2.InverseTransformPoint(new Vector3(x4, y4, z4)).z > 0f ? 1f : -1f;

                        Vector3 point3 = raycastHit.point;

                        Vector3 forward = this.body.forward;

                        float stepLength = this.stepLength;

                        float z5 = this.footOffset.z;

                        float num4 = *(float*)(&stack[-0xC0]);

                        float x5 = this.footOffset.x;

                        float num5 = this.footOffset.y + (point3.y + forward.y * stepLength * num4);

                        this.kn.x = x5 + (point3.x + forward.x * stepLength * num4);

                        this.kn.y = num5;

                        this.kn.z = point3.z + num4 * (forward.z * stepLength) + z5;

                        this.kr = raycastHit.normal;

                    }

                    else

                    {

                        flag = typeof(Math);

                    }

                }

                else

                {

                    flag = typeof(Math);

                }

            }

            else

            {

                flag = typeof(Math);

            }

        }

        else

        {

            flag = raycast;

        }

        float ks = this.ks;

        if (ks < 1f)

        {

            float x6 = this.km.x;

            float y5 = this.km.y;

            float z6 = this.km.z;

            float x7 = this.kn.x;

            float y6 = this.kn.y;

            float num6 = ks < 0f ? 0f : Math.Min(ks, 1f);

            float num7 = num6 * (this.kn.z - z6);

            *(float*)(&stack[-0xC0]) = num6;

            long val;

            sinf(flag, val, op_Implicit, 0);

            float stepHeight = this.stepHeight;

            float x8 = this.kp.x;

            float y7 = this.kp.y;

            float z7 = this.kp.z;

            float x9 = this.kr.x;

            float y8 = this.kr.y;

            float num8 = this.kr.z - z7;

            float num9 = *(float*)(&stack[-0xC0]);

            this.ko.y = y5 + num6 * (y6 - y5) + (int)default * stepHeight;

            this.ko.z = z6 + num7;

            this.ko.x = x6 + num6 * (x7 - x6);

            this.kq.x = x8 + (x9 - x8) * num9;

            this.kq.y = y7 + (y8 - y7) * num9;

            this.kq.z = z7 + num9 * num8;

            this.ks = Math.Min(ks + Time.deltaTime * this.speed, 1f);

        }

        else

        {

            float x10 = this.kn.x;

            float y9 = this.kn.y;

            float z8 = this.kn.z;

            float x11 = this.kr.x;

            float y10 = this.kr.y;

            float z9 = this.kr.z;

            this.km = /* Pack */;

            this.km.z = z8;

            this.kp = /* Pack */;

            this.kp.z = z9;

        }

    }

    public bool bv()

    {

        return this.ks < 1f;

    }

    public FootSystem2()

    {

        base();

    }

}

WHAT

lol