No. Sonic and the Black Knight (2009) was developed by Sonic Team exclusively for the **Nintendo Wii**. It utilizes the Wii Remote's motion controls for sword combat (Caliburn).
If you want sword-action Sonic, Sonic and the Secret Rings (Wii, 2007) is the predecessor—also Wii exclusive.