Commit ab195c8a by Philipp Adolf

Make bullets spawn slightly higher than the player

parent 6a22e00b
......@@ -251,6 +251,7 @@ public class PlayerControl : MonoBehaviour
/// Falls das im Editor falsch ist: Auf 0.2 setzen.
/// </summary>
public float spawnDistance = 0.2f;
public float bulletYOffset = 0.1f;
public void setPowerUpType(int type)
{
powerUpType = type;
......@@ -260,7 +261,7 @@ public class PlayerControl : MonoBehaviour
private void shoot()
{
float dir = -Mathf.Sign(transform.localScale.x);
Vector2 pos = new Vector2(transform.position.x + dir * spawnDistance, transform.position.y);
Vector2 pos = ((Vector2) transform.position) + new Vector2(dir * spawnDistance, bulletYOffset);
switch (powerUpType)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment