Esempio n. 1
0
    private void Awake()
    {
        inst = this;

        obtainUI     = GameObject.Find("ObtainUI").gameObject;
        obtainScript = GameObject.Find("Script").gameObject;
        obtainPopUp  = GameObject.Find("Popup").gameObject;
        obtainImage  = GameObject.Find("ObtainUI/Image").gameObject;

        obtainUI.SetActive(false);
        obtainScript.SetActive(false);
        obtainPopUp.SetActive(false);

        for (int i = 0; i < clueCount; i++)
        {
            isObtain[i] = false;
            for (int j = 0; j < clue[i].obtainScript.Length; j++)
            {
                obtainSciptContent[i, j] = clue[i].obtainScript[j];
            }
        }

        /*
         * obtainSciptContent[0] = "";
         * obtainSciptContent[1] = "";
         * obtainSciptContent[2] = "( 역시! 이거라면, 내가 별로 움직이지 않았다는 걸 증명해줄 수 있겠어! )";
         * obtainSciptContent[3] = "( 없지! )";
         */
    }
    //[SerializeField]
    //private bool touchControlled;

    void Awake()
    {
        music = FMODUnity.RuntimeManager.CreateInstance("event:/Music");

        music.start();

        music.getParameter("Clue", out Clues);

        music.getParameter("Loyalty", out Loyalty);

        Loyalty.setValue(10);

        yarnVarRef = yarnVarRefObj.GetComponent <ExampleVariableStorage>();

        // Populate the Singleton with the followint if and else if statements
        if (S == null)
        {
            S = this;
        }
        else if (S != null)
        {
            Destroy(this);
        }
        //Make sure that the GameObject this is attached to is not deleted on load
        DontDestroyOnLoad(gameObject);
    }
Esempio n. 3
0
    // Use this for initialization
    void Start()
    {
        _tr = GetComponent<Transform>();
        _camera = Camera.main;
        _flawGO.AddRange(GameObject.FindGameObjectsWithTag("Flaw"));
        gaze = GetComponent<GazePointDataComponent>();
        _eyexHost = EyeXHost.GetInstance();
        _handAnim = gameObject.GetComponentInChildren<Animator>();
        gameObject.GetComponentInChildren<Renderer>().material.color = Color.Lerp(Color.white, Color.clear, 0.3f);
        _handTrans = _tr.GetChild(0);
		clueManager = new ClueManager ();
		if (GameObject.FindGameObjectsWithTag ("Clue").Length < 1) {
			puzzleSolved = true;
		}

        GameObject _fade = new GameObject("Fadeout");
        Texture2D _tex2D = new Texture2D(1,1);
        _tex2D.SetPixel(0, 0, Color.white);
        _tex2D.Apply();
        _fadeout = _fade.AddComponent<SpriteRenderer>();
        _fadeout.sprite = Sprite.Create(_tex2D, new Rect(0, 0, 1, 1), new Vector2(0.5f, 0.5f));
        _fadeout.material.color = Color.black;
        _fade.transform.localScale = new Vector3(999,999,999);
        _fade.transform.position = _tr.position + _tr.forward*0.5f;
        _fade.transform.eulerAngles = _camera.transform.eulerAngles;
        _fade.transform.parent = _tr;
    }
Esempio n. 4
0
    private void Awake()
    {
        if (Instance != null)
        {
            Destroy(gameObject);
        }
        else
        {
            Instance = this;
            DontDestroyOnLoad(gameObject.transform);
        }

        m_clueManager       = FindObjectOfType <ClueManager>();
        m_charactersSpawner = FindObjectOfType <CharactersSpawner>();

        for (int i = 0; i < s_nbPlayers; ++i)
        {
            m_availableSlots.Add(i);
        }

        foreach (PlayerScore s in m_scores)
        {
            s.ShowScore(false);
        }
    }
Esempio n. 5
0
 void Awake()
 {
     clueItemInspector = ClueItemInspector.S;
     clueManager       = ClueManager.S;
     nameText          = clueItemInspector.clueListInspectorName;
     descriptionText   = clueItemInspector.clueListInspectorDescription;
     clueImageDisplay  = clueItemInspector.clueImageDisplay;
     clueIconSprite    = Resources.Load("Sprites\\" + clueInfo.clueName, typeof(Sprite)) as Sprite;
 }
Esempio n. 6
0
    void Start()
    {
        inkStory = new Story(inkAsset.text);

        mem_manager  = MemoryFragmentManager.getMemoryFragmentManager();
        clue_manager = ClueManager.getClueManager();

        mem_manager.unpauseEvent += exitMemoryCutscene;
        playerInput = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerInput>();
        playerInput.objection_event += objection;
        playerInput.press_event     += press;
    }
    private static List <string> _nameOfCluesToPresent;         // name of the clues to present. Will be used to search corresponding clue information



    void Awake()
    {
        DontDestroyOnLoad(this);
        // Populate the Singleton with the followint if and else if statements
        if (S == null)
        {
            S = this;
        }
        else if (S != null)
        {
            Destroy(this);
        }
    }
Esempio n. 8
0
 void Awake()
 {
     #region singleton
     if (instance == null)
     {
         DontDestroyOnLoad(gameObject);
         instance = this;
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
     #endregion
 }
Esempio n. 9
0
        public Home(string location)
        {
            Location            = location;
            DocumentGUIDCounter = 0;
            _bLocked            = false;

            _Documents         = new List <Document>();
            _VirtualWorkspaces = new List <VirtualWorkspace>();
            _ForgottenUniverse = new List <Document>();
            _VoidUniverse      = new List <Document>();
            _LinkUniverse      = new List <Document>();

            _ClueManager = new ClueManager();
            _ActiveVW    = new VirtualWorkspace(new Coordinate(0, 0));
            _VirtualWorkspaces.Add(_ActiveVW);
        }
Esempio n. 10
0
    private void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }

        else if (instance != this)
        {
            Destroy(gameObject);
        }

        DontDestroyOnLoad(gameObject);

        Clues = FindObjectsOfType <Clue>();
    }
Esempio n. 11
0
    void Awake()
    {
        #region singleton
        if (instance == null)
        {
            instance = this;
        }
        else if (instance != this)
        {
            Destroy(gameObject);
        }
        #endregion

        clueManager = GameObject.FindGameObjectWithTag("ClueManager").GetComponent <ClueManager>();
        interaction = GameObject.FindGameObjectWithTag("Player").GetComponent <InteractionManager>();
    }
Esempio n. 12
0
    void handleInput()
    {
        //change animation based on if the player is grounded
        animator.SetBool("grounded", isGrounded());

        //if player is pressing down, crouch. the animation logic is in the animator
        crouch = Input.GetAxisRaw("Vertical") == -1;
        animator.SetBool("crouching", crouch);

        //to navigate clues menu
        if (Input.GetKeyDown(KeyCode.Q))
        {
            ClueManager.getClueManager().previousClue();
        }
        if (Input.GetKeyDown(KeyCode.E))
        {
            ClueManager.getClueManager().nextClue();
        }

        //TEMP: objection
        if (Input.GetKeyDown(KeyCode.F))
        {
            if (objection_event != null)
            {
                objection_event();
            }
        }

        //TEMP: press
        if (Input.GetKeyDown(KeyCode.F))
        {
            if (press_event != null)
            {
                press_event();
            }
        }

        //in case we do press to continue cutscenes (prolly not)
        // if (Input.GetKeyDown(KeyCode.Space)) {
        //     // if (next_cutscene_line_event != null) {
        //     //     next_cutscene_line_event();
        //     // }
        // }
    }
 public override void OnStartClient()
 {
     gameManager               = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManager>();
     playerWeapon              = GetComponent <PlayerWeapon>();
     playerDeath               = GetComponent <PlayerDeath>();
     playerDeath.playerKilled += OnDeath;
     gamePlayer       = GetComponent <GamePlayer>();
     clueManager      = GetComponent <ClueManager>();
     changeCameraZoom = GetComponent <ChangeCameraZoom>();
     doorOpenManager  = GetComponent <DoorOpenManager>();
     base.OnStartClient();
     if (!isLocalPlayer)
     {
         return;
     }
     GameObject.FindGameObjectWithTag("VirtualCamera").GetComponent <CinemachineVirtualCamera>().m_Follow = transform;
     GameObject.FindGameObjectWithTag("VirtualCamera").GetComponent <CinemachineVirtualCamera>().m_LookAt = transform;
     gameManager.GameStateChanged += OnGameStateChanged;
 }
Esempio n. 14
0
 void Awake()
 {
     Instance = this;
 }
Esempio n. 15
0
    void Awake()
    {
        #region singleton
        if(instance == null)
        {
            instance = this;
        }
        else if(instance != this)
        {
            Destroy(gameObject);
        }
        #endregion

        clueManager = GameObject.FindGameObjectWithTag("ClueManager").GetComponent<ClueManager>();
        interaction = GameObject.FindGameObjectWithTag("Player").GetComponent<InteractionManager>();
    }
Esempio n. 16
0
 //// Use this for initialization
 void Start()
 {
     container_Player.SetActive(false);
     clueScript = GetComponent <ClueManager>();
 }
Esempio n. 17
0
    void Start()
    {
        // Creat the array to store the crowd
        CrowdObj = new List<GameObject> ();
        clueManager = new ClueManager();

        int x = 0;
        int y = 0;
        int index = 0;

        // Generate our crowd gameobjects
        while(index < NumberInCrowd)
        {
            // Calculate the offset to the first crowd member
            Vector2 GridPosition = new Vector2 (x * SpriteSeperation, -y * SpriteSeperation);

            // Create the object
            GameObject CrowdMember = (GameObject)Instantiate (AnimalPrefab, FirstCrowdMemberStartPosition + GridPosition, new Quaternion ()) as GameObject;
            CrowdMember.transform.parent = CrowdManager.transform;
            CrowdObj.Add (CrowdMember);

            // Move to next member
            x++;
            index++;

            if(index == CrowdMemberPerRow)
            {
                x = 0;
                y++;
            }
        }

        GenerateCrowd ();
    }
Esempio n. 18
0
 void Awake()
 {
     #region singleton
     if(instance == null)
     {
         DontDestroyOnLoad(gameObject);
         instance = this;
     }
     else if(instance != this)
     {
         Destroy(gameObject);
     }
     #endregion
 }