Replace the fillRect method with my self-defined drawRect method with lineTo.And I add the attack action