AI Command Lab // Flight Simulator

2F: Static Utilities

Initial AI Output (Fragile)

// AI-Generated Code (Logic Failure)
public class Enemy : MonoBehaviour {
    public static int health = 100; // ERROR: Shared across ALL enemies!

    public void TakeDamage(int amount) {
        health -= amount;
    }
}

Initial AI Prompt

"You ask the AI: "Create an enemy script where I can easily see the health of any enemy from my UI manager.""

Pilot Comm Link

Mission Objective: Implement an Object Pool to manage active and inactive instances.