// Start is called before the first frame update
 void Start()
 {
     myScale           = waterLevelScaler.localScale;
     _itemInteractions = FindObjectOfType <CornItemInteractions>();
     _itemManager      = FindObjectOfType <CornItemManager>();
     subtractAmount    = 0.2f / _itemInteractions.fullAmount; //half of 1/fullamount
 }
Esempio n. 2
0
    private void Awake()
    {
        gameFSM = new FSM <GameManager>(this);

        if (!GetComponent <CornItemManager>())
        {
            gameObject.AddComponent <CornItemManager>();
        }

        _cornItemManager       = GetComponent <CornItemManager>();
        _FoodInteractionScript = FindObjectOfType <CornItemInteractions>();
        _monologueManager      = GetComponent <CornMonologueManager>();
        _audioManager          = FindObjectOfType <AudioManager>();
        _mouseLook             = FindObjectOfType <CornMouseLook>();
        TitleMenu.SetActive(false);
        OrderMenu = GameObject.Find("OrderMenu");
        OrderMenu.SetActive(false);

        FindObjectOfType <CornBuoyancy>().waterBoilTimeInseconds = waterBoilSeconds;
        textAnimFSM     = GetComponent <PlayMakerFSM>();
        cleanupBowl     = GameObject.Find("BowlForTmr");
        backgroundMusic = GameObject.Find("BackgroundMusic").GetComponent <AudioSource>();



//        if (Debug_StartWithState == 1 || Debug_StartWithState == 2)
//        {
//            foreach (var child in FindObjectsOfType<FoodSpawner>())
//            {
//                child.StartCoroutine(child.Initiate());
//            }
//
//            gameFSM.TransitionTo<CookingState>();
//        }
//        else if(Debug_StartWithState == 0)
//        {
//            gameFSM.TransitionTo<OrderState>(); //default state
//        }
    }
Esempio n. 3
0
    void Start()
    {
        MyCam = Camera.main;
        CornGameEvents.instance.OnGameStateSwitchEnter += ScreenFadeOut;
        CornGameEvents.instance.OnGameStateSwitchExit  += ScreenFadeIn;

        _itemManager      = FindObjectOfType <CornItemManager>();
        _itemInteractions = FindObjectOfType <CornItemInteractions>();
        _mouseLookScript  = FindObjectOfType <CornMouseLook>();

        ImgSlot = GameObject.Find("Reticle").GetComponent <Image>();
        //ImgSlot.gameObject.SetActive(false);
        fadeImage       = GameObject.Find("FadeImage").GetComponent <Image>();
        fadeImage.color = new Color(0, 0, 0, 1);
        fadeImage.gameObject.SetActive(true);


        ZoomInstruction.SetActive(false);
        InteractInstruction.SetActive(false);
        EndGameInstruction.SetActive(false);
        EatButtonInstruction.SetActive(false);

        finalAnimation = FindObjectOfType <FinalBowlAnimation>();
    }