コード例 #1
0
    // Update is called once per frame
    void Update()
    {
        if (running)
        {
            citizen.Forward(true, forward);
        }
        else if (target is Player)
        {
            Player p = (Player)target;

            if (p.hasShotCitizen)
            {
                citizen.afraid = true;
                //citizen.Forward(false, Vector3.zero);
            }
            if (walking)
            {
                citizen.Forward(false, forward);
            }
            else
            {
                citizen.Forward(false, Vector3.zero);
            }
        }
        else
        {
            citizen.Forward(false, Vector3.zero);
        }
    }