Simple Coding Demo

Description:

Simple Coding Demo is a Unity project designed to teach fundamental Unity concepts to students. The project includes player movement, health management, scoring, and interaction with game objects. Players can control an object's movement using keyboard input, collect items to increase their score, and avoid enemies to maintain their health. The project incorporates key Unity features, such as player input, object interaction, health management, and UI integration.

Features:

  • Player movement controlled by keyboard input (up, down, left, right arrows).
  • Health management system with adjustable maximum health (playerMaxHealth) and current health (playerCurrentHealth). Health is displayed using TextMeshPro (healthText) and a UI slider (healthSlider). Health text and slider fill color change based on health percentage.
  • Score management system with a totalScore variable. The score is displayed using TextMeshPro (scoreText).
  • Game objects interaction:
    • BonusItem script allows players to collect items, increasing their score upon collision.
    • EnemyController script reduces the player's health when colliding with an enemy object (damageValue).

Installation:

To install the project, simply create a fork of this repository on Git and clone it to your local machine.

Unity Version:

This project is built using Unity version 2022.3.10f1 with a Universal Render Pipeline (URP) setup.

Dependencies:

  • Text Mesh Pro
  • Low-poly toy cars created by Indian Ocean Assets

How to Play:

  1. Control the game object using the keyboard arrow keys.
  2. Collect items to increase your score.
  3. Avoid obstacles to maintain your health.

Credits:

  • Text Mesh Pro: Unity Asset Store
  • Low-poly Toy Cars: Created by Indian Ocean Assets

Screenshots:

Main Scene

License:

No license is required for this project. Feel free to use, modify, and distribute it as needed.