예제 #1
0
    public override void AgentAction(float[] vectorAction)
    {
        this.now_step++;
        area.Update();
        // Fell off platform
        // Rewards

        if (now_step < 700)
        {
            //かくれんぼだから、最初は待機
            return;
        }
        float distanceToTarget = Vector3.Distance(this.transform.localPosition,
                                                  Kodomo.localPosition);

        // Reached target
        if (distanceToTarget < 1.00f)
        {
            area.OniWin();
        }

        // Fell off platform
        if (this.transform.localPosition.y < 0)
        {
            Done();
        }

        MoveAgent(vectorAction);
    }
예제 #2
0
    public override void AgentAction(float[] vectorAction)
    {
        this.now_step++;
        area.Update();
        float distanceToTarget = Vector3.Distance(this.transform.localPosition,
                                                  Oni.localPosition);

        // Reached target
        if (distanceToTarget < 1.00f)
        {
            area.OniWin();
        }

        // Fell off platform
        if (this.transform.localPosition.y < 0)
        {
            Done();
        }
        MoveAgent(vectorAction);
    }