void Update() { if (motionController.CurrentMotionState == MotionState.Dead) { return; } if (health <= 0) { motionController.DeadTrigger(); return; } Transform player = sensorController.GetNearByPlayer(); if (player == null) { return; } if (SpinKickAble(player, motionController.CurrentMotionState)) { if (CrossPlatformInputManager.GetButton("J")) { PlayerMotionController pmc = player.GetComponent <PlayerMotionController>(); pmc.SpinKickTrigger(); } } }
void Start() { motionController = GetComponent <PlayerMotionController>(); gunShell = transform.Find("GunWithCamera").Find("GunShell").gameObject; gunShellController = gunShell.GetComponent <GunShellController>(); GameObject mainCamera = GameObject.FindGameObjectWithTag("MainCamera"); aimPoint = mainCamera.transform.Find("AimPoint"); GameObject sparkPrefab = Resources.Load <GameObject>("Effects/Spark"); sparkGameObject = Instantiate(sparkPrefab); spark = sparkGameObject.GetComponent <ParticleSystem>(); }
void Update() { if (GameManager.Instance.CurrentGameState != GameManager.GameState.Play) { return; } if (motionController.CurrentMotionState == MotionState.Dead) { resurgenceCount += Time.deltaTime; if (resurgenceCount >= resurgenceTime) { motionController.Resurgence(); health = 200; resurgenceCount = 0; } return; } if (health <= 0) { motionController.DeadTrigger(); return; } Transform player = sensorController.GetNearByPlayer(); if (player == null) { return; } if (SpinKickAble(player, motionController.CurrentMotionState)) { if (CrossPlatformInputManager.GetButton("J")) { PlayerMotionController pmc = player.GetComponent <PlayerMotionController>(); pmc.SpinKickTrigger(); } } }
void Start() { playerAnimator = GetComponent <Animator>(); playerMotionController = player.GetComponent <PlayerMotionController>(); gunShellController = gunShell.GetComponent <GunShellController>(); }
void Start() { motionController = GetComponent <PlayerMotionController>(); animator = transform.Find("SWAT_Female").GetComponent <Animator>(); FindEnemy(); }
void Start() { motionController = GetComponent <PlayerMotionController>(); player = Archive.CurrentArchive.Player; }
void Start() { playerMotionController = player.GetComponent <PlayerMotionController>(); }