示例#1
0
 public void SetupComputer(VirtualComputer pc)
 {
     Computer = pc;
     if (!Window)
     {
         Window = Computer.CreateWindow(WindowPrefab);
     }
 }
示例#2
0
        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]);
            }
        }