"Airplane War" game development record

game developedLearning records

Project: Airplane War

Start time: 2022.09.12

(A class assignment with my own ideas added)

New things learned:

  1. Add a Mars material picture like this. There is an unnecessary black part next to it.
    Insert image description here
    Select the Rendering Mode (rendering mode) of Cutout
    Insert image description here
    and it will become only the Mars material.
    Insert image description here

Problem record:

  1. The player's bullets are fired very quickly

reason:

transform.Translate(new Vector3(0, 0, m_speed*Time.deltaTime));

Written

transform.Translate(new Vector3(0, 0, m_speed+Time.deltaTime));

If the multiplication sign is changed to a plus sign, the speed will take off directly, so fast that the bullet cannot be seen.
Solution: Obviously, just change the plus sign to a multiplication sign.

  1. The enemy did not disappear after leaving the screen.
    Reason: I don’t know. I couldn’t find the reason. I implemented it in another way.
    Solution: Added an air wall around it, added collision detection, and disappeared upon contact.

  2. The enemy's bullets stopped in place after being fired.
    Reason: Forgot to mount the code for the bullets.

Screenshot of the finished product:

Insert image description here

Insert image description here

Insert image description here

Guess you like

Origin blog.csdn.net/zhurouwanzi/article/details/126877592