
Unit 2 - Basic Gameplay
Course•Beginner•5h 20m
Unity Technologies
교육 과정 개요
In this Unit, you will program a top-down game with the objective of throwing food to hungry animals - who are stampeding towards you - before they can run past you. In order to do this, you will become much more familiar with some of the most important programming and Unity concepts, including if-then statements, random value generation, arrays, collision detection, prefabs, and instantiation. In completing this Unit, you will learn how to program a basic game with the ability to launch projectiles and maneuver the player to keep the game alive.
Languages available:
교육 과정 완료로 획득할 수 있는 추가 XP
+600
가능한 총 XP
720 XP
잘 다루는 주제
For EducatorsScripting
교육 담당자용 리소스
By the end of this unit, you will be able to:
- Create an if-then statement in order to implement basic logic in your project, including the use of greater than (>) and less than (<) operators
- Transform a gameobject into a prefab that can be instantiated into the scene
- Work with prefabs to add efficiencies in your workflows
- Get user input with GetKey and KeyCode to test for specific keyboard presses
- Use arrays to create an accessible list of objects or values and randomly select an object from that array
- Randomly generate values to randomize spawn positions
- Change the camera’s perspective to better suit your game
- Repeat functions on a timer with InvokeRepeating
- Write custom methods to make your code more readable
- Detect collisions and destroy objects that collide with each other
- Display messages in the console with Debug Log