void Awake()
 {
     NotificationController  = NotificationObject.GetComponent <NotificationController>();
     ObjectiveController     = ObjectiveObject.GetComponent <ObjectiveController>();
     ElectricCableController = ElectricCable.GetComponent <ElectricCableController>();
     AirlockDoorController   = AirlockOuterDoor.GetComponent <AirlockDoorController>();
     VoiceLines = GetComponent <AudioSource>();
     AirlockPressurisationController = AirlockTrigger.GetComponent <AirlockPressurisationController>();
     FabricatorController            = FabricatorTrigger.GetComponent <FabricatorController>();
     PlayerStats = GetComponent <PlayerStats>();
     BeaconLocationController = GetComponent <BeaconLocationController>();
     RescueController         = GetComponent <RescueController>();
 }
Esempio n. 2
0
    public void SetMeatLevel(MeatLevel level)
    {
        GameObject fabPrefab = m_fabricatorPrefabs.FirstOrDefault(x => x.GetComponent <FabricatorController>().Level == level);

        if (fabPrefab != null)
        {
            GameObject instFabricator = Instantiate(fabPrefab, m_fabricatorParent);
            m_currentFabricator = instFabricator.GetComponent <FabricatorController>();
        }
        else
        {
            Debug.Log($"Unable to find Fabricator prefab for level {level}");
        }
    }