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();
                }
            }
        }
Example #2
0
        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>();
        }
Example #3
0
        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>();
 }
Example #5
0
 void Start()
 {
     motionController = GetComponent <PlayerMotionController>();
     animator         = transform.Find("SWAT_Female").GetComponent <Animator>();
     FindEnemy();
 }
Example #6
0
 void Start()
 {
     motionController = GetComponent <PlayerMotionController>();
     player           = Archive.CurrentArchive.Player;
 }
Example #7
0
 void Start()
 {
     playerMotionController = player.GetComponent <PlayerMotionController>();
 }