public void toggleCharacterFocus(GameObject _Character) { Debug.Log("toggleCharacterFocus(" + _Character.name + ")"); bool currentStatus = this.CharacterPath[_Character].gameObject.activeSelf; foreach (GameObject currentCharGO in this.CharacterDict.Values) { if (currentCharGO == _Character) { this.CharacterPath[_Character].gameObject.SetActive(!currentStatus); //toggling currentOne. } else { this.CharacterPath[currentCharGO].gameObject.SetActive(false); } } BHV_CameraMotion CameraMotionComp = Camera.main.GetComponent <BHV_CameraMotion>(); if (CameraMotionComp.Following == null) { CameraMotionComp.Following = _Character; } else { CameraMotionComp.Following = null; } }
void Start() { StoryLineComp = this.GetComponent <BHV_Storyline>(); CameraMotionComp = this.GetComponent <BHV_CameraMotion>(); }