itch.io is community of indie game creators and players

Devlogs

scripting walkthough 1&2

Intro to scripting
A downloadable game

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
Download Intro to scripting
Leave a comment