コード例 #1
0
        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();
                }
            }
        }
コード例 #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>();
        }
コード例 #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();
                }
            }
        }
コード例 #4
0
 void Start()
 {
     playerAnimator         = GetComponent <Animator>();
     playerMotionController = player.GetComponent <PlayerMotionController>();
     gunShellController     = gunShell.GetComponent <GunShellController>();
 }
コード例 #5
0
 void Start()
 {
     motionController = GetComponent <PlayerMotionController>();
     animator         = transform.Find("SWAT_Female").GetComponent <Animator>();
     FindEnemy();
 }
コード例 #6
0
 void Start()
 {
     motionController = GetComponent <PlayerMotionController>();
     player           = Archive.CurrentArchive.Player;
 }
コード例 #7
0
 void Start()
 {
     playerMotionController = player.GetComponent <PlayerMotionController>();
 }