示例#1
0
    public override bool Tick(AIInput g)
    {
        g.moveHor(Player.transform.position);
        g.FG(Player.transform.position.x - g.transform.position.x < 0);



        return(false);
    }
示例#2
0
    // Use this for initialization
    public override bool Tick(AIInput g)
    {
        g.moveHor(Player.transform.position);
        if (jumpRange != 0)
        {
            Vector3 dif = Player.transform.position - g.transform.position;
            if (Mathf.Abs(dif.x) < jumpRange && dif.y > 1)
            {
                g.jump();
            }
        }

        return(false);
    }