Ejemplo n.º 1
0
    void Start()
    {
        operationObjectsNOT_TO_USE_JUST_TO_SEE_IN_INSPECTOR = operationObjects;

        LevelLogic.InitLevelLogic();

        initUnlocks();

        instantiatableObjects = instantiatableObjectsToSet;
        for (int i = 0; i < instantiatableObjects.Length; i++)
        {
            // Sets the actual "objectID" of each instantiatable object on the prefabs for easy access:

            // This is no longer used, syncGameState will handle the type:

            if (instantiatableObjects [i])
            {
                if (instantiatableObjects [i].GetComponent <SyncGameState> ())
                {
                    instantiatableObjects [i].GetComponent <SyncGameState> ().objectType = (byte)i;
                }
            }
        }

        // The following are only used by server:
        operationGameObjectSpawnTimes.Add(0);       // Spawn time is not used for this..
        operationGameObjectBufferedRPCs.Add(new List <object[]>());
        operationGameObjectsData.Add(null);         // Not instantiatable..
    }