identifier idents no member "vel" at:
line(103,31);
line(104, 31);
line(128, 54);
state: IStatePlayer;
The interface IStatePlayer does not define the variable "vel". Naturally, because interfaces can only define methods.
can u help me?
Yes. Use an abstract base class instead of an interface. A base class can also have variables.
I don't know what design experts say but IMO an interface is overrated. In most cases an abstract base class does a better job. The only exception is when your design
really needs multiple interfaces for one class. Such a situation can usually be avoided. Actually the concept of "interface" is a hack to complement the lack of multiple inheritance (as in C++), which again has many inherent problems.
Object Pascal makes the issue worse because it mixes memory management with interfaces. An interfaced object by default is freed automatically while other objects are not.
Lazarus IDE and its ...Intf classes that support plugins use abstract base classes extensively. Please take a look.