Skip to content

Feature5 enemy service#4

Open
JoyJazper wants to merge 8 commits intoFeature3-PlayerTrackerfrom
Feature5-EnemyService
Open

Feature5 enemy service#4
JoyJazper wants to merge 8 commits intoFeature3-PlayerTrackerfrom
Feature5-EnemyService

Conversation

@JoyJazper
Copy link
Copy Markdown
Owner

Just for comparison, not ready for merging yet.

@@ -0,0 +1,3 @@
public class SpawnerObject : MonoSingleton<SpawnerObject>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the need for the SpawnerObject? You can get spawn positions(children) without using this script

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont want to drop any object but only the one which has spawner children, just extra precaution.

} else {
enemy = GameObject.Instantiate(greenTank, randomSpawnPosition, Quaternion.identity, enemyParent);
}
enemy.Health = tankData.health;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pass scriptable object to enemy controller and setup enemy in that script. Single Responsibility Principle is broken as this function does too many things.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will do.

Copy link
Copy Markdown

@kan15hk kan15hk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants