Unity Roguelike help

Asked

Viewed 86 times

0

The Unity compiler is presented with this error when implementing the Player control.

Assets/Scripts/Player.Cs(58,33): error CS0115: `Player.Attemptmove(int, int)' is marked as an override but no suitable method found to override

Code:

"protected override void AttemptMove <T> (int xDir, int yDir)
    {

        food--;

        base.AttemptMove <T> ( xDir, yDir);

        RaycastHit2D hit;



    CheckIfGameOver ();

    GameManager.instance.playerTurn = false;

    }"

1 answer

0

The error says that there is no method to be overwritten with that name in higher classes or if there is such a method they are not marked as virtual or Abstract. I do not know what is the derivation of the function of this class and what is the structure of the other classes in the hierarchy in question, you would have to provide more information. Take a look at Tutorials on the Unity website.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.