Implementing atacking for ghost and enemies