Skip to content

Commit

Permalink
Dificuldade da sala do boss
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasVinicius314 committed Oct 28, 2022
1 parent 810aec9 commit c2b0606
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Assets/Prefabs/Enemies/RangedEnemy.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ MonoBehaviour:
mobileProjectilePrefab: {fileID: 4802643116889572473, guid: 3a11f9dbbd4a23d4db2b2401bd79afa2, type: 3}
attackPoint: {fileID: 4625630236950262534}
secondsBeteweenAttacks: 0.7
projectileForce: 10
projectileForce: 6
--- !u!1 &7070262502191703618
GameObject:
m_ObjectHideFlags: 0
Expand Down
2 changes: 1 addition & 1 deletion Assets/Prefabs/MobileProjectile.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: fd4b2615f25f5314aa86f1937ebc1f2a, type: 3}
m_Name:
m_EditorClassIdentifier:
damage: 1
damage: 5
--- !u!1 &7043519708395930104
GameObject:
m_ObjectHideFlags: 0
Expand Down
2 changes: 1 addition & 1 deletion Assets/Prefabs/Projectile.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: fd4b2615f25f5314aa86f1937ebc1f2a, type: 3}
m_Name:
m_EditorClassIdentifier:
damage: 1
damage: 5
--- !u!1 &8638391970917913851
GameObject:
m_ObjectHideFlags: 0
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scenes/MainScene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -1539,7 +1539,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 2932101238397256823, guid: 3b586217a958dcd42976ca69ca9e3ed3, type: 3}
propertyPath: m_AnchoredPosition.y
value: 637.7245
value: 645.7085
objectReference: {fileID: 0}
- target: {fileID: 2932101238483661021, guid: 3b586217a958dcd42976ca69ca9e3ed3, type: 3}
propertyPath: m_AnchorMax.x
Expand Down
10 changes: 8 additions & 2 deletions Assets/Scripts/RoomScript.cs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ public void SpawnEnemies()
var batchSize =
settings.spawnBatchSize *
settings.difficultyIndexWeight *
settings.difficultyCurve.Evaluate(difficultyIndex / 20);
settings.difficultyCurve.Evaluate(difficultyIndex / 20f);

Debug.Log(
$"Current room difficulty: {difficultyIndex}: {batchSize} enemies."
Expand Down Expand Up @@ -317,7 +317,13 @@ public void UpdateDifficulty()

void Awake()
{
difficultyIndex = transform.position.magnitude;
var magnitude = transform.position.magnitude;

var newDifficultyIndex = roomType == RoomType.boss
? magnitude * 2f + 200f
: magnitude;

difficultyIndex = newDifficultyIndex;
}

void Start()
Expand Down

0 comments on commit c2b0606

Please sign in to comment.