//recordar toda la parte de triggers habilitados public override void OnInitialize() { rangeCornerManager = GetComponentInChildren <RangeCornerManager>(); myRoomtrigger = GetComponentInChildren <LocalRoomTriggers>(); doormanager = GetComponentInChildren <DoorManager>(); //esto tiene que estar antes de "doormanager.FreeAllDoors();" porque tiene que buscar los trigger antes de que el doormanager me los apague myRoomtrigger.Initialize(); doormanager.FreeAllDoors(); RefreshValues();//esto no va es solo para probar que todo funca }
public void PlayerEnterIn(LocalRoomTriggers roomselected, GameObject go) { if (current != null) { current.GetDungeonElements().ForEach(x => x.OnPlayerExitInThisRoom()); } current = roomselected; if (current != null) { var dunelems = current.GetDungeonElements(); foreach (var e in dunelems) { e.OnPlayerEnterInThisRoom(go.transform); } } }
private void Awake() { myRoomtrigger = GetComponentInChildren <LocalRoomTriggers>(); }