Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Mr BigSock
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gard Aleksander Furre
Mr BigSock
Commits
07fd07cb
Commit
07fd07cb
authored
2 years ago
by
Robin Halseth Sandvik
Browse files
Options
Downloads
Patches
Plain Diff
Test code.
parent
99cac02d
No related branches found
Branches containing commit
No related tags found
1 merge request
!56
New ability fire rework. (Charging)
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
MrBigsock/Assets/Code/Core/Abilities/Base/FireType.cs.meta
+11
-0
11 additions, 0 deletions
MrBigsock/Assets/Code/Core/Abilities/Base/FireType.cs.meta
MrBigsock/Assets/Code/PlayerController.cs
+9
-1
9 additions, 1 deletion
MrBigsock/Assets/Code/PlayerController.cs
with
20 additions
and
1 deletion
MrBigsock/Assets/Code/Core/Abilities/Base/FireType.cs.meta
0 → 100644
+
11
−
0
View file @
07fd07cb
fileFormatVersion: 2
guid: a4433520002352142bf81c89a15742f3
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
Click to expand it.
MrBigsock/Assets/Code/PlayerController.cs
+
9
−
1
View file @
07fd07cb
...
@@ -124,6 +124,7 @@ namespace BigSock {
...
@@ -124,6 +124,7 @@ namespace BigSock {
/*
/*
Triggers an ability if it should be.
Triggers an ability if it should be.
Need to add support for mouse buttons n shiet
*/
*/
private
void
CheckAbilityInput
(
KeyCode
key
,
IAbility
ability
)
{
private
void
CheckAbilityInput
(
KeyCode
key
,
IAbility
ability
)
{
var
par
=
GetAbilityParam
(
Camera
.
main
.
ScreenToWorldPoint
(
Input
.
mousePosition
));
var
par
=
GetAbilityParam
(
Camera
.
main
.
ScreenToWorldPoint
(
Input
.
mousePosition
));
...
@@ -144,7 +145,8 @@ namespace BigSock {
...
@@ -144,7 +145,8 @@ namespace BigSock {
// If let go: Activate
// If let go: Activate
else
if
(
Input
.
GetKeyUp
(
key
))
{
else
if
(
Input
.
GetKeyUp
(
key
))
{
par
.
ChargeTime
=
Time
.
time
-
chargeStarts
[
key
];
par
.
ChargeTime
=
Time
.
time
-
chargeStarts
[
key
];
ability
.
Use
(
par
);
var
t
=
ability
.
Use
(
par
);
if
(!
t
)
Debug
.
Log
(
$"[PlayerController.CheckAbilityInput(
{
key
}
)]
{
ability
.
Name
}
not fired (
{
par
.
ChargeTime
}
/
{
ability
.
MinCharge
}
)"
);
}
}
break
;
break
;
default
:
default
:
...
@@ -176,6 +178,12 @@ namespace BigSock {
...
@@ -176,6 +178,12 @@ namespace BigSock {
CheckAbilityInput
(
KeyCode
.
Z
,
_testAttack2
);
CheckAbilityInput
(
KeyCode
.
Z
,
_testAttack2
);
// Check ability 3.
// Check ability 3.
CheckAbilityInput
(
KeyCode
.
X
,
_dodge
);
CheckAbilityInput
(
KeyCode
.
X
,
_dodge
);
//if(Input.GetKeyDown(KeyCode.Z)) Debug.Log($"[PlayerController.Update()] Z was pressed.");
//if(Input.GetKeyUp(KeyCode.Z)) Debug.Log($"[PlayerController.Update()] Z was let go.");
//if(Input.GetKeyUp(KeyCode.UpArrow)) Debug.Log($"[PlayerController.Update()] UpArrow was let go.");
//if(Input.GetKeyUp(KeyCode.Space)) Debug.Log($"[PlayerController.Update()] Space was let go.");
//// If pressed Z: Big attack.
//// If pressed Z: Big attack.
//if(Input.GetKey(KeyCode.Z)) {
//if(Input.GetKey(KeyCode.Z)) {
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment