コード例 #1
0
    private void Process1()
    {
        RandomAngle random = new RandomAngle();

        anim.SetBool("Walk", true);
        agent.stoppingDistance = 0;
        var randomPos = transform.position + random.RandomPosition();

        agent.destination = randomPos;

        Invoke("Process2", UnityEngine.Random.Range(2, 5));
    }
コード例 #2
0
    // Use this for initialization
    void Start()
    {
        angle1     = new float[] { -22.5f, 22.5f, -22.5f, 22.5f, -22.5f, 22.5f, -22.5f, 22.5f, -10f, 10f, -10f, 10f, -10f, 10f, -10f, 10f, -15f, 15f, -15f, 15f, -15f, 15f, -15f, 15f };
        testNumber = angle1.Length;

        // testNumber = (int)(((Mathf.Abs(angle) * 2) / gap));
        angles = new float[testNumber];

        rot     = new Rotation();
        ran     = new RandomAngle();
        save    = new Saving();
        results = new List <float>();
        sort    = new Sort();
        data    = new SortedList <float, float>();
    }