Week3 Sprint

 For this week, I've taken down by my health issue, so I could not spend time to do my work.

What I did is to change particles from 2022 to 2020 version (I misunderstood the version of Unity we are working on). Above gif image is after editing particles to 2020.

This is what I made in Photoshop little quick.


This video is about boosting when the kart is accelerated. Below source code is edited version of the previous work, added public string variable. This part can be a game object in future. I use same source code but this input will be changed in future to the bool. 


    public string name;
    const float StopDuration = 100000.0f;
    ParticleSystem ps;
    void Start()
    {
        ps = transform.Find(name).GetComponent< ParticleSystem>();
        ChangeParticle(StopDuration);
        ps.gameObject.SetActive(false);
    }
    void Update()
    {
        if (Input.GetKeyDown("w"))
        {
            ps.gameObject.SetActive(true);
            ChangeParticle(0.1f);
        }
        else if (Input.GetKeyUp("w"))
        {
            ChangeParticle(StopDuration);
        }
    }
    public void ChangeParticle(float speed)
    {
        ps.Stop();
        var main = ps.main;
        main.duration = speed;
        ps.Play();
    }

I'm running with above source code now, but


    public gameObject Particle;
    ps = Particle.GetComponent< ParticleSystem>();

bool switch = false; if (switch) { } else if (!switch) { } }

they will be replaced as new codes



For the modeling, I made Pear Tree and LOD.

Comments

Popular posts from this blog

Sprint 2 CAGD 495

Sprint 5 CAGD 495

Game Scene Final Project Post