コード例 #1
0
    // GetComponentFunction
    // Mainly use for Get Component
    void GetComponentFunction()
    {
        if (_anim == null)
        {
            _anim = GetComponentInChildren <Animator>();
        }

        if (_capsuleCollider == null)
        {
            _capsuleCollider = GetComponent <CapsuleCollider>();
        }

        if (_rgbd == null)
        {
            _rgbd = GetComponent <Rigidbody>();
        }
        if (_playerLifeState == null)
        {
            _playerLifeState = GetComponent <PlayerLifeStatement>();
        }
        if (_PlayerDeadEffect == null)
        {
            Debug.Log("Please Add The Effect to the Object");
        }
    }
コード例 #2
0
 // Name : AvoidNullProblem
 // Method : This Function mainly is use for defend Avoid Null Problem
 void AvoidNullProblem()
 {
     if (_INSTANCE == null)
     {
         _INSTANCE = this;
     }
     _PlayerCtrl = GetComponent <PlayerCtrl>();
 }
コード例 #3
0
 // GetComponentFunction
 // Mainly used for Get the Component
 void GetComponentFunction()
 {
     if (_PlayerAnim == null)
     {
         _PlayerAnim = GameObject.FindGameObjectWithTag("PlayerAnimation").GetComponent <Animator>();
     }
     if (_PlayerLifeCtrl == null)
     {
         _PlayerLifeCtrl = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerLifeStatement>();
     }
     if (_PlayerCtrl == null)
     {
         _PlayerCtrl = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerCtrl>();
     }
 }
コード例 #4
0
 void AvoidNullProb()
 {
     if (_spm2 == null)
     {
         Debug.Log("That's something You need to added ");
     }
     if (_gm2 == null)
     {
         Debug.Log("That's something you need to added");
     }
     if (_Player == null)
     {
         Debug.Log("That's something you need to added ");
     }
     if (_GiveUPanel == null)
     {
         Debug.Log("That 's something you need to added ");
     }
     if (_BoxSetActiveAsTrue == null)
     {
         Debug.Log("That 's something You need to added ");
     }
     if (_playerCtrl == null)
     {
         _playerCtrl = _Player.GetComponent <PlayerCtrl>();
     }
     if (_PlayerAnim == null)
     {
         _PlayerAnim = _Player.GetComponentInChildren <Animator>();
     }
     if (_PlayerLifeStatemen == null)
     {
         _PlayerLifeStatemen = _Player.GetComponent <PlayerLifeStatement>();
     }
     if (_Npc == null)
     {
         Debug.Log("That's Something You need to added");
     }
 }
コード例 #5
0
 void AvoidNullProblem()
 {
     if (_INSTANCE == null)
     {
         _INSTANCE = this;
     }
     if (_player == null)
     {
         GameObject.FindGameObjectWithTag("Player");
     }
     if (_playerCtrl == null)
     {
         _playerCtrl = _player.GetComponent <PlayerCtrl>();
     }
     if (_ClearPanelAnimation == null)
     {
         _ClearPanelAnimation = _ClrPanel.GetComponent <RectTransform>();
     }
     if (_TxtAnimation == null)
     {
         _TxtAnimation = _Txt.GetComponent <RectTransform>();
     }
     if (_txtAnimator == null)
     {
         _txtAnimator = _Txt.GetComponent <Animator>();
     }
     if (_BtnRestartAnimator == null)
     {
         _BtnRestartAnimator = _BtnRestart.GetComponent <Animator>();
     }
     if (_BtnrestartTxtAnimator == null)
     {
         _BtnrestartTxtAnimator = _BtnRestart.GetComponent <Animator>();
     }
     if (_BtnQuitAnimator == null)
     {
         _BtnQuitAnimator = _BtnQuit.GetComponent <Animator>();
     }
     if (_BtnQuitTxtAnimator == null)
     {
         _BtnQuitTxtAnimator = _BtnQuitTxt.GetComponent <Animator>();
     }
     if (_BtnQuitAnimation == null)
     {
         _BtnQuitAnimation = _BtnQuit.GetComponent <RectTransform>();
     }
     if (_BtnRestartAnimation == null)
     {
         _BtnRestartAnimation = _BtnRestart.GetComponent <RectTransform>();
     }
     if (_txtAnimatorGameOver == null)
     {
         _txtAnimatorGameOver = _GameOverTxt.GetComponent <Animator>();
     }
     if (_TxtAnimationGameOver == null)
     {
         _TxtAnimationGameOver = _GameOverTxt.GetComponent <RectTransform>();
     }
     if (_txtAnimatorWantToTryAgn == null)
     {
         _txtAnimatorWantToTryAgn = _WantTotryAgainTxt.GetComponent <Animator>();
     }
     if (_TxtAnimationWantToTryAgn == null)
     {
         _TxtAnimationWantToTryAgn = _WantTotryAgainTxt.GetComponent <RectTransform>();
     }
     if (_BtnRestartAnimatorgGameOver == null)
     {
         _BtnRestartAnimatorgGameOver = _BtnRestartGameOver.GetComponent <Animator>();
     }
     if (_BtnQuitAnimatorGameQuit == null)
     {
         _BtnQuitAnimatorGameQuit = _BtnQuitGameOver.GetComponent <Animator>();
     }
     if (_BtnRestartTxtAnimatorGameOver == null)
     {
         _BtnRestartTxtAnimatorGameOver = _BtnRestartTxtGameOver.GetComponent <Animator>();
     }
     if (_BtnQuitTxtAnimatorGameOver == null)
     {
         _BtnQuitTxtAnimatorGameOver = _BtnQuitTxtGameOver.GetComponent <Animator>();
     }
     if (_BtnPauseAnimator == null)
     {
         _BtnPauseAnimator = _PauseBtnGameObject.GetComponent <Animator>();
     }
     if (_bossScript == null)
     {
         _bossScript = _BossActiveTime.GetComponent <BOSSScript>();
     }
     if (_StartingPanel == null)
     {
         Debug.Log("That's something You need to Add Before ");
     }
     if (_StartingPanelAnim == null)
     {
         _StartingPanelAnim = _StartingPanel.GetComponent <Animator>();
     }
     if (_StartingTxt == null)
     {
         Debug.Log("That's something You need to Add");
     }
     if (_StartingTxtAnim == null)
     {
         _StartingTxtAnim = _StartingTxt.GetComponent <Animator>();
     }
     if (_RedLines == null)
     {
         Debug.Log("That's Something You need To Added Which is the Red Lines Color");
     }
     if (_SubCameras == null)
     {
         Debug.Log("That's Something You need To Added Which is Sub Camera ");
     }
     if (_PrefectTxtAnimator == null)
     {
         _PrefectTxtAnimator = _PrefectTxt.GetComponent <Animator>();
     }
     if (_PlayerLifeStatement == null)
     {
         _PlayerLifeStatement = _player.GetComponent <PlayerLifeStatement>();
     }
 }
コード例 #6
0
 // This Function is used for Avoid Null Problem
 void AvoidNullProb()
 {
     if (_ClearObject == null)
     {
         _ClearObject = _GameClearObject.GetComponent <GameClearObject>();
     }
     if (_playerLife == null)
     {
         _playerLife = _Player.GetComponent <PlayerLifeStatement>();
     }
     if (_PauseBtn == null)
     {
         Debug.LogWarning("Please Add the Pause Button");
     }
     if (_PauseAnim == null)
     {
         _PauseAnim = _PauseBtn.GetComponent <Animator>();
     }
     if (_LifeSlider == null)
     {
         Debug.Log("That is something strange ?");
     }
     if (_LifeSliderAnim == null)
     {
         _LifeSliderAnim = _LifeSlider.GetComponent <Animator>();
     }
     if (_TeachingThePosition == null)
     {
         Debug.LogError("Please Added Some Object To this");
     }
     if (_EachTenAnim == null)
     {
         _EachTenAnim = _EachTenObject.GetComponent <Animator>();
     }
     if (_EachTwentyAnimator == null)
     {
         _EachTwentyAnimator = _EachTwentyObject.GetComponent <Animator>();
     }
     if (_EachThirdtyAnimator == null)
     {
         _EachThirdtyAnimator = _EachThirtyObject.GetComponent <Animator>();
     }
     if (_EachFourtyAnimator == null)
     {
         _EachFourtyAnimator = _EachFourtyObject.GetComponent <Animator>();
     }
     if (_EachFiftyAnimator == null)
     {
         _EachFiftyAnimator = _EachFiftyObject.GetComponent <Animator>();
     }
     if (_TipsDo == null)
     {
         Debug.Log("Please Drap the TipDO In This Script");
     }
     if (_KillEnemyCountDownAnimator == null)
     {
         _KillEnemyCountDownAnimator = _KillEnemyCountObj.GetComponent <Animator>();
     }
     if (_ThankYouPlayingAnotherMission == null)
     {
         Debug.Log("PleaseAddSomethings");
     }
     if (_spMission2 == null)
     {
         Debug.Log("That's Something you need to added ");
     }
     if (_NpcChracter == null)
     {
         Debug.Log("That's A Chracter which is NPC You need to added ");
     }
     if (_WolfAppreadTxt == null)
     {
         Debug.Log("That's something You need to added");
     }
 }