Laravel9プロジェクト作成

作業ディレクトリで以下のコマンドを記述

・composer create-project laravel/laravel bunbogu -prefer-dist

composer create-project laravel/laravel bunbogu

 

composer create-project --prefer-dist laravel/laravel SampleProject

Laravelプロジェクトの作成と起動 - Qiita

 

  [Symfony\Component\Console\Exception\RuntimeException]
  The "-p" option does not exist.

 

 -prefer-distを消す

プロジェクト立ち上げ


php artisan make:migration create_bunbougu_table

データベースのテーブル作成

 

Command "make" is not defined. Did you mean one of these?

エラー

 

mysqladminでデータベース作成後コマンドを打つとなおる

 

php artisan make:migration create_bunbougus_table

 

php artisan make:migration create_bunruis_table

error CS0111: Type 'Attack' already defines a member called 'CheckAttack' with the same parameter types

error CS0111: Type 'Attack' already defines a member called 'CheckAttack' with the same parameter types

 

同じメソッド名を消す。CheckAttack

    public void CheckAttack()
    {

    }

    public void CheckAttack()
    {
        if(!status.IsAttack)return;

        status.GoToAttack();
    }

オーバーライドするときに変更できないエラー

error CS0507: 'EnemyStatus.Start()': cannot change access modifiers when overriding 'public' inherited member 'Statusmanag

 

 

アクセス修飾子を同じにしようねてこと。

public abstract class Statusmanager : MonoBehaviour
{

    protected virtual void Start()
    {
        animator = GetComponentInChildren<Animator>();
    }

}

 

 

public class EnemyStatus : Statusmanager
{

    protected override void Start()
    {
        base.Start();

        agent = GetComponent<NavMeshAgent>();
    }