changed player sprite to use cast operator of texture resource. Seems to not work if I try to use a function with it