How to create a child object inside the parent (script) and assign independent variables?
Hello Unity community, I am a fairly new user and programmer to unity and it's C# language, and so far I have been loving the engine. Please take the time to respond if convenient;
I'm trying to make a business tycoon game that allows you to build different fast food chains around the game map and assign workers to said restaurants, the player will be able to hire workers using a UI panel that opens when you click the store model. I believe I can work around the coding needed to make this work, but I'm at a loss on the object implementation side.
[details]
WORKER SCRIPT -
int responsibility
int skill
int attitude
int charisma
float wage
STORE SCRIPT -
int storeResponsibility
int storeSkill
int storeAttitude
int storeCharisma
float storeWages
(1) Click "Hire" button in the UI.
(2) Empty game object (worker) created with values (inside parent).
(3) Values on each worker added to the store [parent objects] values.
(4) Click "Fire" button in the UI.
(5) Empty game object (worker) is removed from parent (store).
(6) Store values are updated to reflect the removal of worker.
Any help or advice I could get would be greatly appreciated, I know you don't owe me any of your time and am grateful for it. Thank you!