Reflex Training
Mechanic Sector
(Engage card to reveal Pilot's Intelligence.)
The Pilot's Audit
"The AI Trap: "The Inspector Web""
// AI-Generated Code: The "Public" Trap
public void FireWeapon() {
// Audit Fail: This method must be Public to be seen by the Inspector.
// Now anyone can call it, breaking encapsulation.
...
}
Protocol Analysis
This is "Encapsulation Breach." Making methods public just to satisfy the UI button system is a security risk.
Audit Complete
The Pilot's Audit
"The AI Trap: "The Prefab Spawner""
// AI-Generated Code: Object Spam
void Start() {
for(int i=0; i<50; i++) {
Instantiate(linePrefab, uiParent);
}
}
Protocol Analysis
This is "Hierarchy Pollution." It creates a massive list of objects that slows down the UI layout engine.
Audit Complete
The Pilot's Audit
"The AI Trap: "The Infinity Ray""
// AI-Generated Code: Expensive & Unfiltered
void Update() {
// Audit Fail: Infinite distance? Checking every frame?
// Hitting everything including dust particles?
if (Physics.Raycast(transform.position, fwd, out hit)) {
Debug.Log("Hit something!");
}
}
Protocol Analysis
This is "Infinite Range." The raycast will check objects 5 miles away, wasting CPU. It also lacks a LayerMask, so it hits non-obstacles.
Audit Complete
The Pilot's Audit
"The AI Trap: "The Flat Boom""
// AI-Generated Code: 2D Default
void Explode() {
// Audit Fail: By default, PlayOneShot is 2D.
// The sound plays at full volume regardless of distance.
audioSource.PlayOneShot(boomClip);
}
Protocol Analysis
This is "Global Deafness." The player cannot tell where the threat is coming from.
Audit Complete
The Pilot's Audit
"The AI Trap: "The Manual Mover""
// AI-Generated Code: The "Dumb" Walker
void Update() {
// Audit Fail: This moves in a straight line.
// It will walk through walls and get stuck on corners.
transform.position = Vector3.MoveTowards(transform.position,
player.position,
speed * Time.deltaTime);
}
Protocol Analysis
This is "Dumb Movement." The AI has no awareness of the environment. It will try to walk through a mountain to get to the player.
Audit Complete
The Pilot's Audit
"The AI Trap: "The While-Loop Freeze""
// AI-Generated Code: The Game Crasher
void OpenDoor() {
door.Open();
// Audit Fail: This loop blocks the Main Thread.
// The game freezes completely until the door is open.
while (!door.isOpen) {
// Do nothing
}
Move();
}
Protocol Analysis
This is a "Thread Lock." The game cannot render frames or accept input while inside this loop. The OS will think the game has crashed.
Audit Complete
Scanning database for new traps