Exemple #1
0
 public void SetupComputer(VirtualComputer pc)
 {
     Computer = pc;
     if (!Window)
     {
         Window = Computer.CreateWindow(WindowPrefab);
     }
 }
        void Start()
        {
            Computer = GetComponentInParent <VirtualComputer>();

            IProgram[] programs = GetComponents <IProgram>();
            Programs = new List <IProgram>(programs);

            foreach (IProgram program in Programs)
            {
                Program instance = program as Program;
                if (instance)
                {
                    instance.SetupComputer(Computer);
                }

                program.Init(new string[0]);
            }
        }