Help Unity RogueLike

0

The Unity compiler shows this error when implementing 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;

    }"
    
asked by anonymous 13.08.2016 / 01:05

1 answer

0

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

    
28.10.2016 / 04:37