| | |
| | | if (null != bulletTrans) |
| | | { |
| | | bulletTrans.anchoredPosition = pos; |
| | | |
| | | } |
| | | |
| | | Vector2 dir = end - start; |
| | | float angle = Mathf.Atan2(dir.y, dir.x) * Mathf.Rad2Deg; |
| | | float angle = Mathf.Atan2(dir.y, dir.x) * Mathf.Rad2Deg + (caster.Camp == BattleCamp.Red ? 0 : 180); |
| | | if (null != bulletTrans) |
| | | { |
| | | bulletTrans.localRotation = Quaternion.Euler(0, bulletTrans.transform.localScale.x < 0f ? 180 : 0, angle); |
| | | bulletTrans.rotation = Quaternion.Euler(0, 0, angle); |
| | | } |
| | | // if (bulletTrans.transform.localScale.x < 0f) |
| | | // { |
| | | // bulletTrans.transform.localRotation *= Quaternion.Euler(0, 180, 0); |
| | | // } |
| | | |
| | | if (t >= 1f) |
| | | { |
| | | finished = true; |