Skip to content

Mejoras workerbot #333

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
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions Assets/Scenes/CP_Scenes/workerBot scene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -12342,6 +12342,61 @@ Transform:
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 94f6e24a780fb8343b7e4471fbfe0973, type: 3}
m_PrefabInstance: {fileID: 2095635814}
m_PrefabAsset: {fileID: 0}
--- !u!1 &2099424134
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2099424137}
- component: {fileID: 2099424136}
- component: {fileID: 2099424135}
m_Layer: 11
m_Name: mouseRaycastPlane
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!64 &2099424135
MeshCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2099424134}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 4
m_Convex: 0
m_CookingOptions: 30
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
--- !u!33 &2099424136
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2099424134}
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &2099424137
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2099424134}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0.85, z: 0}
m_LocalScale: {x: 20, y: 20, z: 20}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 9
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &2110463108
PrefabInstance:
m_ObjectHideFlags: 0
Expand Down
6 changes: 2 additions & 4 deletions Assets/Sripts/Enemies/WorkerBotBehavior.cs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ private void FSM_LVL_2() //{ IDLE, PURSUE, ATTACK }
}
}

private void OnTriggerEnter(Collider other)
private void OnTriggerStay(Collider other)
{
//si detecta al jugador activa el collider del arma y comienza a atacar
if (enabled)
Expand All @@ -264,10 +264,8 @@ private void GearUpgrade()

attackDamage = 7 + 1 * currentGears; //aumenta el da�o por cada moneda recogida
weaponCollider.attackDamage = attackDamage; //le paso el da�o nuevo al script del arma

//activo el efecto de particulas de brillantitos, mas cantidad por cada moneda que tenga
print(currentGears);
}

private void HealUpgrade()
{
//mejora aplicada al coger una cura
Expand Down