Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
Spieleentwicklung
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
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Adrian Paschkowski
Spieleentwicklung
Commits
237c0244
Verified
Commit
237c0244
authored
3 years ago
by
Adrian Paschkowski
Browse files
Options
Downloads
Patches
Plain Diff
Fix enemy cost calculation again
parent
0fd9c066
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Assets/Scripts/Fighters/Enemy.cs
+0
-2
0 additions, 2 deletions
Assets/Scripts/Fighters/Enemy.cs
Assets/Scripts/UI/OpponentDragSpawner.cs
+3
-0
3 additions, 0 deletions
Assets/Scripts/UI/OpponentDragSpawner.cs
with
3 additions
and
2 deletions
Assets/Scripts/Fighters/Enemy.cs
+
0
−
2
View file @
237c0244
...
...
@@ -73,8 +73,6 @@ public abstract class Enemy : Fighter
{
base
.
OnDestroy
();
RoundController
.
instance
.
placedEnemies
.
Remove
(
this
);
// Not ideal but meh, no time
DragDestroyController
.
instance
.
listeners
.
ForEach
(
l
=>
l
.
OnEnemyDeleted
(
gameObject
,
opponentType
));
}
}
This diff is collapsed.
Click to expand it.
Assets/Scripts/UI/OpponentDragSpawner.cs
+
3
−
0
View file @
237c0244
...
...
@@ -86,6 +86,7 @@ public class OpponentDragSpawner : MonoBehaviour, IRoundCallback, IManaChangeCal
placedOpponentCount
++;
}
}
UpdateDisplayStates
();
}
public
void
OnEnemyPlaced
(
GameObject
enemy
,
Opponent
opponent
,
bool
validPosition
)
...
...
@@ -121,6 +122,8 @@ public class OpponentDragSpawner : MonoBehaviour, IRoundCallback, IManaChangeCal
public
void
OnRoundEnd
(
bool
won
)
{
// To make sure this is called _after_ enemies might have destroyed itself in this callback
Invoke
(
nameof
(
RecalculatePlacedOpponentsCount
),
0.01f
);
UpdateDisplayStates
();
}
...
...
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