Hi,I want to create an event:When an enemy touch my player,he triggers an evenement called FightBegin and something appends.
I have several problems with this .
My idea was to let the enemy called a function of my script EventManager called Launchfight and that function will launch the event message and all gameobject “know” this.
Actually, i made multiple attempts.To try if that works,my RicoController script have to debug “event ok”.I tried multiple ways but i’m actually lost.
Can someone help me?
(for helping you,i have this error now:Assets\Scripts\ennemydetector.cs(51,18): error CS1061: ‘Component’ does not contain a definition for ‘interim’ and no accessible extension method ‘interim’ accepting a first argument of type ‘Component’ could be found (are you missing a using directive or an assembly reference?)) But i want to solve my story of event and if i take the bad way ,don’t try to solve the error.
Linked bellow three scripts.RicoController is player’s script and anemy detector is enemy’s script(No interest after line 50).
6642970–758386–EventManager.cs (556 Bytes)
6642970–758389–RicoController.cs (1.62 KB)
6642970–758392–ennemydetector.cs (3.88 KB)