Comments

Log in with itch.io to leave a comment.

(1 edit)

using UnityEngine;

public class PlayerController : MonoBehaviour

{

    public ScoreManager ScoreManager;

    public AudioSource audioshoot;

    public Transform playerTransform;

    public GameObject projectilePrefab;  // Reference to the projectile prefab

    public Transform shootPoint;  // Point from which the projectile will be shot

    public Transform shootPoint2;  // Point from which the projectile will be shot

    public float shootCooldown = 0.0f;  // Cooldown time between shots

    private float shootTimer;

    void Update()

    {

        if (Input.GetKeyDown(KeyCode.DownArrow))

        {

            transform.Rotate(0 ,180, 0);

        }

        if (Input.GetKeyDown(KeyCode.Mouse1))

        {

            transform.Rotate(0 ,180, 0);

        }

        shootTimer -= Time.deltaTime;

        if (Input.GetButtonDown("Fire1"))

        {

            

            Shoot();

            shootTimer = shootCooldown;

            audioshoot.Play();

        }

        if (Input.GetKeyDown(KeyCode.Space))

        {

            Shoot();

            shootTimer = shootCooldown;

            audioshoot.Play();

        }

    }

    private void Shoot()

    {

        if (ScoreManager.last)

        {

            Instantiate(projectilePrefab, shootPoint.position, shootPoint.rotation);

            Instantiate(projectilePrefab, shootPoint2.position, shootPoint2.rotation);

        }

        if (ScoreManager.first)

        {

            

        }

        Instantiate(projectilePrefab, shootPoint.position, shootPoint.rotation);

    }

}

this is player control I used the score to make the bullet dubled

the bool (last) is from script named scoremanger

Hey, thanks for entering the jam!  I see you put "miniscript" in the tags.  Can you explain how this project uses MiniScript?  Maybe share an example of some of the scripts involved?

(Feel free to reach out on Discord if you prefer to discuss there; my Discord ID is JoeStrout.)

using UnityEngine;

public class PlayerController : MonoBehaviour

{

    public ScoreManager ScoreManager;

    public AudioSource audioshoot;

    public Transform playerTransform;

    public GameObject projectilePrefab;  // Reference to the projectile prefab

    public Transform shootPoint;  // Point from which the projectile will be shot

    public Transform shootPoint2;  // Point from which the projectile will be shot

    public float shootCooldown = 0.0f;  // Cooldown time between shots

    private float shootTimer;

    void Update()

    {

        if (Input.GetKeyDown(KeyCode.DownArrow))

        {

            transform.Rotate(0 ,180, 0);

        }

        if (Input.GetKeyDown(KeyCode.Mouse1))

        {

            transform.Rotate(0 ,180, 0);

        }

        shootTimer -= Time.deltaTime;

        if (Input.GetButtonDown("Fire1"))

        {

            

            Shoot();

            shootTimer = shootCooldown;

            audioshoot.Play();

        }

        if (Input.GetKeyDown(KeyCode.Space))

        {

            Shoot();

            shootTimer = shootCooldown;

            audioshoot.Play();

        }

    }

    private void Shoot()

    {

        if (ScoreManager.last)

        {

            Instantiate(projectilePrefab, shootPoint.position, shootPoint.rotation);

            Instantiate(projectilePrefab, shootPoint2.position, shootPoint2.rotation);

        }

        if (ScoreManager.first)

        {

            

        }

        Instantiate(projectilePrefab, shootPoint.position, shootPoint.rotation);

    }

}

this is player control I used the score to make the bullet dubled

Nice code!  But it's C#, not MiniScript.