Exemple #1
0
 private void GetPlayerScript()
 {
     //_playerMove = transform.GetComponent<PlayerMove>();
     _playerStatus    = this.GetComponent <PlayerStatus>();
     _playerToolsBase = this.GetComponent <PlayerToolsBase>();
     _playerInfo      = this.GetComponent <PlayerInfo>();
     //_thirdPersonCharacter_WSM = this.GetComponent<ThirdPersonCharacter_WSM>();
     _testToolsManagers = this.GetComponent <TestToolsManagers>();
     _motionController  = this.GetComponent <com.ootii.Actors.AnimationControllers.MotionController>();
     //_leftBackpackController = _leftHandController.transform.Find("RadialMenu/RadialMenuUI/Panel").GetComponent<BackpackController>();
     //_rightBackpackController = _rightHandController.transform.Find("RadialMenu/RadialMenuUI/Panel").GetComponent<BackpackController>();
 }
Exemple #2
0
    private void Awake()
    {
        _healthSlider      = this.GetComponentInChildren <Slider>();
        _playerInfo        = GameObject.FindObjectOfType <PlayerInfo>();
        _testToolsManagers = PlayerManager.Instance.testToolsManagers;
        if (_playerInfo == null)
        {
            Debug.Log(string.Format("<color=red>获取  PlayerInfo 失败</color>"));
        }
        if (_healthSlider == null)
        {
            Debug.Log(string.Format("<color=red>获取  Slider 失败</color>"));
        }


        _weaponImg          = UtilFunction.GetChildComponent <Image>(this.transform, "Img_Weapon");
        _magazineImg        = UtilFunction.GetChildComponent <Image>(this.transform, "Magazine");
        _grenadeImg         = UtilFunction.GetChildComponent <Image>(this.transform, "Grenade");
        _healthCount        = UtilFunction.GetChildComponent <Text>(this.transform, "Tex_HealthCount");
        _magazineCount      = UtilFunction.GetChildComponent <Text>(this.transform, "Tex_MagazineCount");
        _grenadeCount       = UtilFunction.GetChildComponent <Text>(this.transform, "Tex_GrenadeCount");
        _tempPropGroupTrans = UtilFunction.GetChildNode(this.transform, "TempPropGroup");
    }
Exemple #3
0
 private void UpdateEquipShow()
 {
     if (_testToolsManagers != null)
     {
         if (_curEquipItem != null)
         {
             if (_testToolsManagers.curItem != _curEquipItem)
             {
                 Equip(_testToolsManagers.curItem);
                 _curEquipItem = _testToolsManagers.curItem;
             }
         }
         else
         {
             Equip(_testToolsManagers.curItem);
             _curEquipItem = _testToolsManagers.curItem;
         }
     }
     else
     {
         _testToolsManagers = PlayerManager.Instance.testToolsManagers;
     }
 }