Beispiel #1
0
    public void walkRight()
    {
        Vector3 target = Vector3.right * Random.Range(3, 5) + this.transform.position;

        currentAction = WalkAction.GetWalkAction(target, walkSpeed, ani);
        this.runAction(this.gameObject, currentAction, this);
    }
Beispiel #2
0
    public void walk()
    {
        Vector3 target = new Vector3(Random.Range(-1f, 1f), 0, Random.Range(-1f, 1f)) + transform.position;

        baseAction = WalkAction.GetWalkAction(target, walkSpeed, animator);
        this.runAction(this.gameObject, baseAction, this);
    }
Beispiel #3
0
    public void walkLeft()
    {
        Vector3 target = new Vector3(Random.Range(-1, 1), 0, Random.Range(-1, 1)) + transform.position;

        currentAction = WalkAction.GetWalkAction(target, walkSpeed, ani);
        this.runAction(this.gameObject, currentAction, this);
    }
Beispiel #4
0
    public void walkForward()
    {
        Vector3 target = Vector3.forward * Random.Range(4, 7) + this.transform.position;

        currentAction = WalkAction.GetWalkAction(target, walkSpeed, ani);
        this.runAction(this.gameObject, currentAction, this);
    }
Beispiel #5
0
    public void walkBack()
    {
        Vector3 target = Vector3.back * Random.Range(3, 5) + this.transform.position;

        action = WalkAction.GetWalkAction(walkSpeed, target, animator);
        this.RunAction(this.gameObject, action, this);
    }