Beispiel #1
0
    //-------------
    // アクション
    //-------------
    private IEnumerator Action()
    {
        while (true)
        {
            if (parts)
            {
                if (parts.Get_Parts_Type() == "Gun")
                {
                    yield return(new WaitForSeconds(5f));

                    parts_manager.Action(1, Activation_Determination_Gun());
                }
                if (parts.Get_Parts_Type() == "Shield")
                {
                    yield return(new WaitForSeconds(5f));

                    parts_manager.Action(1, Activation_Determination_Shield());
                }
            }
            else
            {
                yield return(new WaitForSeconds(3f));

                Debug.Log(name + " : キック");
            }
        }
    }
    //-------------
    // アクション
    //-------------
    private IEnumerator Action()
    {
        yield return(null);

        while (true)
        {
            yield return(new WaitForSeconds(4f));

            if (Random.Range(1, 10) <= 7)
            {
                if (Random.Range(0, 2) == 0)
                {
                    parts_manager.Action(2, 1);
                }
                else
                {
                    parts_manager.Action(2, 2);
                }
            }
            else
            {
                yield return(null);
            }
        }
    }
    //-------------
    // アクション
    //-------------
    private IEnumerator Action()
    {
        yield return(null);

        while (true)
        {
            if (Mathf.Pow(enemy_ctrl.Get_Player().position.y - transform.position.y, 2) < Mathf.Pow(action_range_y, 2) &&
                Mathf.Pow(enemy_ctrl.Get_Player().position.z - transform.position.z, 2) < Mathf.Pow(action_range_z, 2))
            {
                yield return(new WaitForSeconds(5f));

                parts_manager.Action(1, 1);
            }
            else
            {
                yield return(null);
            }
        }
    }