PedrelliLuca / ScalarField

A TopDown RPG Game, where magic works by interacting with the environment.
4 stars 0 forks source link

Skill: Thermal Push #13

Closed PedrelliLuca closed 2 years ago

PedrelliLuca commented 2 years ago

What?

Add a spell that lets the player immediately apply a force that pushes objects away from him. Moreover:

The force is applied by momentarily spawning a capsule component in front of the player's character.

PedrelliLuca commented 2 years ago

The UThermalPush skill requires a check on the caster's current temperature. To avoid a cyclic dependency between the ScalarField and the SkillSystem modules, I had to create a Thermodynamics module containing the UTemperatureComponent and make both modules depend on it. This was already planned in #10, two birds with one stone 😉

image

@startuml
skinparam sequenceArrowThickness 2
skinparam roundcorner 20
skinparam sequenceParticipant underline
skinparam linetype ortho

package ScalarField
package EnvironmentGrid
package SkillSystem
package Thermodynamics

ScalarField +-- EnvironmentGrid
ScalarField +-- SkillSystem
ScalarField +-- Thermodynamics
SkillSystem +-- Thermodynamics
@enduml