//Functions for view / camera private void SetTrack(bool value) { TrackedCamera trackedCamera = Camera.main.GetComponent <TrackedCamera>(); trackedCamera.xTrack = value; trackedCamera.yTrack = value; trackedCamera.zTrack = value; }
public static bool SetTrackOffset(this Camera camera, Vector3 offset) { TrackedCamera tracker = camera.GetComponent <TrackedCamera>(); if (tracker == null) { return(false); } tracker.SetOffset(offset); return(true); }
//Functions For Track public static bool ImmediateTrack(this Camera camera) { TrackedCamera tracker = camera.GetComponent <TrackedCamera>(); if (tracker == null) { return(false); } tracker.ImmediateSet(); return(true); }
void Start() { IsSceneOver = false; GameManager.gameScene = GameScene.Ex1; HUDManager.instance.SetCamera(Camera.main); PauseMenu.instance.SetCamera(GameCamera.UI); trackedCamera = Camera.main.GetComponent <TrackedCamera>(); viewAngle = 0f; SetCameraAngle(viewAngle); Player.IsMovable = true; Player.IsArmed = true; Curtain.instance.ChangeColor(2f, Curtain.black, Curtain.black_clear); if (!SoundManager.instance.IsPlaying) { SoundManager.instance.PlayBgm(bgm, 2f); SoundManager.instance.SetBgmLoop(BGM_LOOP_POINT, BGM_LOOP_LENGTH); } TurnForward(1.5f); Player.instance.transform.position = new Vector3(0f, 0f, -10f); Player.instance.SmoothMoveTo(Vector3.zero, 1.5f); SetGlobalSpeed(SPEED_MIN); //Init of enemies HUDManager.instance.AddHPBar(BOSS_ID_KO_SHI, "KO-SHI", 0.21f, -0.06f, 0.3125f); HUDManager.instance.AddHPBar(BOSS_ID_RO_SHI, "RO-SHI", -0.21f, -0.06f, 0.3125f); ko_Shi.healthPoint = (int)BOSS_HP; ro_Shi.healthPoint = (int)BOSS_HP; ko_Shi.SetActive(false); ro_Shi.SetActive(false); StartCoroutine(NoramlBattle(1)); StartCoroutine(CheckBossState()); }