scripting walkthough 1&2


date: 26.3.2024

time spent: cca 3.5hours

activity: scripting walkthough 1&2

notes:

Programming was straight forward, hardest part for me was with the bullet variants, where I had a problem actually setting the different velocities for the bullets, this part didn't work for me:

public void SetBulletVariant(BulletVariant bulletVariant) {

    GetComponent<SpriteRenderer>().color = bulletVariant.color;

    GetComponent<Rigidbody2D>().velocity = this.direction * bulletVariant.speed;

} as I was also changing the .velocity inside the Start function. So I added the variant speed into the speed variable and let the velocity handling for the Start function.

Apart from this, the walkthough was super nice to follow, glad we have this type of description.

Files

ScriptingPart1&2.zip 86 MB
Mar 26, 2024

Get Intro to scripting

Leave a comment

Log in with itch.io to leave a comment.