-
Notifications
You must be signed in to change notification settings - Fork 0
Finished "Demo" for BA Exhibition #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Toreole
wants to merge
158
commits into
main
Choose a base branch
from
task/polish-for-exhibit
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add Player Ship placeholder model, Add Player prefab, Add Sandbox scene
… inconsistencies in the angle calculations
Add camera following player
- Committing automatically modified packages. This shouldn't break anything.
- Added a folder for all directly weapon/shooting-related C# files: "Weapons" to "_Scripts/Runtime/Weapons". - Removed unused `using`-directives in Game.cs.
- Added the "WeaponTesting" scene for testing the weapons and shooting mechanics.
- Added a base-class for all specific weapons, the abstract `Weapon` class, inheriting `MonoBehaviour`. - Added a WeaponController.cs file, which will handle input and general weapon controls.
- Imported the (new) Input System to the project. - Added an abstract `Shoot` method inside the `Weapon` class. - Added (empty) `OnEnable` and `OnDisable` methods in WeaponController.cs, which will be needed in the near future.
- Set-up basic input actions in the (new) Input System.
- Add InputSystem to assembly definition.
The main focus of this commit is setting up a first example of receiving input and executing something upon that.
Unity:
- Added a cube, representing a "player" and a cuboid, the weapon.
- Created a "Specific Weapons" folder inside the "Weapons" folder to contain all the files for the specific weapon files, whose classes inherit `Weapon`.
- Switched the location of the files that are relevant for the input.
WeaponsController.cs:
- Added a summary to the `WeaponsController` class.
- Added 3 fields
- One for the reference to the `MainInput` instance for the input...
- ... the other one for storing the currently selected `Weapon`...
- ... and the third one as a reference to the physical GameObject, representing the Weapon.
- Added `Awake()` method, where a temporary solution for the input has been set-up (right now, the WeaponController creates a new `MainInput` instance, later it should be a global reference), as well as adding the current weapon component to the weapon object is performed there.
- Added event for firing the weapon.
Weapon.cs:
- Changed method signature of `Shoot` to contain an `InputAction.CallbackContext` parameter.
Gun.cs:
- Created a first example class, that's deriving from `Weapon`. It represents a firearm/gun.
- Implemented a `Debug.Log` into the overridden `Shoot` method.
Input Actions:
- Added a "Weapons" Input Action.
- Added a "Fire" binding, bound to the Left mouse button for now.
- Added a folder inside the "Assets/_Game/_Scripts/Runtime/Weapons/" directory, which will contain the files for all the interfaces that will be relevant for the weapons-mechanic.
This commit focuses on STARTING the system to allow different weapons having a specific fire-type (semi-automatic, automatic, burst, continuous). It also contains some extending of the folder structure and project organisation.
- `Gun` class is `abstract` now.
- Weapon.cs contains an enum `FireType` that specifies the fire-type with 4 different modes (SemiAutomatic, Automatic, Burst, Continuous).
- `Weapon` class contains two protected properties (WeaponFireType as `FireType` and FireTime as `float`).
- Added a "Weapons" folder in "Assets/_Game/" directly, which will (temporarily) contain all the important aesthetic files (materials, models, prefabs, maybe sound effects etc.).
- Inside this folder, there are "Materials", "Models" (currently empty) and "Prefabs".
- Created a prefab for an example semi-auto rifle.
- Added a simple yellow material to this weapon.
ModelLeaner script provided by Wokarol
an old semi-functional script of mine that lets you set up very basic pipe meshes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the final version that will be shown as a graduation project.
Should be merged and have a tag created.