edogdu / RAM_Cyber_Defenders

Cybersecurity Learning Game in AR/VR Environment
2 stars 1 forks source link

Event Interacter #9

Closed LightTheBlues closed 4 months ago

Luk-Er4 commented 5 months ago

image

Interactor Events was helpful to start building the logic below.

  1. Players should place the card based on its color. They can place blue cards only on the blue section. It is also applied for green and red cards.
  2. Placing blue cards on the blue section will generate the socket for placing the green cards on the green section.
  3. Placing blue cards on the blue section will generate the socket for placing the red cards on the opponent's red section.

I used the "SetActive" function in the Select Entered section to build the rules above. The function enables us to activate(make it appear on the scene) the game objects that are deactivated(not appear on the scene) as default. In this project, I activated the sockets for blue cards but deactivated the green and red card sockets. If I place the blue card on the blue socket, then the green card socket will appear, and the red socket for my opponent will be activated. In other words, I am not allowed to put green cards on the game board unless I put blue cards on it. Also, my opponent will not allowed to put the red card on the board.