Tuesday, November 29, 2022

11/29/22

Time Worked: 3:05PM - 4:15PM

Total Time: 1 hr, 10 mins 

Today I did pretty good considering I wan't feelin it. So I was able to make the enemies disappear when the player is not in the room. They also stop firing and chasing the player (for now). 

The way I did it is by creating an interface called "ISetActive" (not sure how I feel about the name but whatever). The interface contains Activate() and DeActivate() method declarations. Any contents of the room (actors, environment, interactive stuff) now should implement this interface. The Room instance has a list of ISetActives that is goes through and activates or deactivates whenever the room is triggered.

I also set the furniture to use this now instead of a separate system. Good shit.

Now there's a problem with the enemy not being able to shoot when the player enters and leaves a room a few times. I think it has something to do with coroutines on Weapon being stopped in the middle of their process and the state variables not being set to what they should be. Not sure. Probably a coroutine somewhere, maybe in the Enemy class.

Ya know. I probably could just disable only visual elements. That would probably be smart. So I don't gotta bother with making sure script states are good to go.

States.

Hmm.


No comments:

Post a Comment

Continuing the Work

 I have been thinking a lot lately. This is a hard thing. There's only so little time... I'm just one person. I'm one person, wh...