Beispiel #1
0
    private eAISequence AISequence; // @brief 現在のジグザグのシーケンス

    #endregion

    #region 初期化

    /// <summary>
    /// @brief MarkerBaseの実装
    /// </summary>
    protected override void MarkerInitialize()
    {
        base.MarkerInitialize();

        // リストの初期化
        markerPos    = new List <Vector2>();
        AIMarkerList = new List <GameObject>();
        AIMarkerList = GameObjectExtension.GetGameObject(markerObjName, DecideAIStrength());

        // コンポーネントの取得
        me           = this.gameObject;
        mySail       = me.transform.Find("Sail").gameObject;
        myHuman      = me.transform.Find("Human").gameObject;
        getWindParam = GameObjectExtension.Find("UIWind").GetComponent <GetWindParam>();

        // 変数の初期化
        myRadius         = transform.localEulerAngles.y;
        currentMarker    = 0;
        currentHitMarker = 1;

        AIStatus   = eAIStatus.NULL;
        AISequence = eAISequence.NULL;

        GetMarkerVec2();
        currentDistance = Distance(myPos, markerPos[currentHitMarker]);

        NextPointDeg();
        SailRotate(getWindParam.ValueWind, me.transform.localEulerAngles.y);
    }
    private float constantValue;      // @brief

    private void Start()
    {
        player         = GameObjectExtension.Find("Player");
        sail           = GameObjectExtension.Find("Sail");
        human          = GameObjectExtension.Find("Human");
        moveCircle     = GameObjectExtension.Find("Circle");
        shipController = gameObject.GetComponent <ShipController>();
        windVec        = GameObjectExtension.Find("UIWind").GetComponent <GetWindParam>();


        minSpeed = 10;
        maxSpeed = 60;

        constantValue = (maxSpeed - minSpeed) / 180;

        CircleChangeRotate();
    }
Beispiel #3
0
    private void Start()
    {
        sail = this.transform.Find("Sail");


        //human = GameObjectExtension.Find("Human");
        //moveCircle = GameObjectExtension.Find("Circle");
        //shipController = gameObject.GetComponent<ShipController>();
        windVec = GameObjectExtension.Find("UIWind").GetComponent <GetWindParam>();


        minSpeed = 10;
        maxSpeed = 50;

        //constantValue = (maxSpeed - minSpeed) / 180;

        //CircleChangeRotate();
    }
    GetWindParam windDirection;                           // @brief 風向きの数値入力する変数

    /// <summary>
    /// @brief 初期化
    /// </summary>
    protected override void MarkerInitialize()
    {
        base.MarkerInitialize();

        // UIWind(風向き用の矢印)の向きを変更させる
        windDirection = GameObject.Find("UIWind").GetComponent <GetWindParam>();

        // プレイヤーがマーカーを通った判定をする
        markerJudg = GameObject.Find("Player").GetComponent <MarkerColliderTrigger>();

        // マーカーオブジェクトの個数を取得する
        for (int i = 0; i < markerList.Count; i++)
        {
            // Debug.Log("名前:" + markerList[i].name);
            tmpPos.Add(markerList[i].gameObject.transform.position);
            //  Debug.Log("座標:" + tmpPos[i]);
        }


        currentMarker    = 0; // マーカーの個数の初期化
        currentHitMarker = 1; // スタートがあるときは2で初期化
    }
Beispiel #5
0
    private eAISequence AISequence;     // @brief 現在のジグザグのシーケンス

    #endregion

    #region 初期化

    /// <summary>
    /// @brief MarkerBaseの実装
    /// </summary>
    protected override void MarkerInitialize()
    {
        base.MarkerInitialize();

        // リストの初期化
        markerPos    = new List <Vector2>();
        AIMarkerList = new List <GameObject>();
        AIMarkerList = GameObjectExtension.GetGameObject(markerObjName, DecideAIStrength());

        // コンポーネントの取得
        me           = this.gameObject;
        mySail       = me.transform.Find("Sail").gameObject;
        getWindParam = GameObjectExtension.Find("UIWind").GetComponent <GetWindParam>();

        // 変数の初期化
        myRadius         = transform.localEulerAngles.y;
        currentMarker    = 0;
        currentHitMarker = 1;

        // ステートの初期化
        AIStatus     = eAIStatus.NULL;
        AISequence   = eAISequence.NULL;
        AIMoveStatus = eAIMoveStatus.NULL;

        // 角度の取得
        GetMarkerVec2();

        // 取得した角度の初期化
        NextPointDeg();

        // セールの角度の初期化
        SailRotate(getWindParam.ValueWind, me.transform.localEulerAngles.y);

        // 旋回速度の初期化
        ChangeShipTurnSpeed();
    }
Beispiel #6
0
    private GetWindParam windParam; // @brief 風の情報

    private void Start()
    {
        shipObj   = GameObjectExtension.Find("Player");
        windParam = gameObject.GetComponent <GetWindParam>();
    }