Ok, I’m sorry if you have trouble understanding me, my technical english isn’t very good. However…
I have 2 interfaces.
public interface IItem
{
GameObject itemGO { get; set; }
}
public interface IHasItemPlace {
GameObject itemPlace { get; set; }
IItem item { get; set; }
bool hasItemPlaced { get; set; }
}
As you can see, IHasItemPlace has a parameter of IItem.
There is a class Player, that implements IHasItemPlace, and there is also a class Salver, that implements both. The thing is, when i equate item in Player to a Salver object, i can’t access it’s IHasItemPlace parameters. I need to get an item, that is in salver, while the salver itself is in player. I thought to do something like
(IHasItemPlace)player.item.item
or
player.(IHasItemPlace).item.item
But it doesn’t seem to work (of course).
Is there any way to make this happen?