You can do it with an interface, you just need to add a parameter of the desired type to the interface (character in the example), so that you don’t need to cast it every time: