Example #1
0
        private void SetColor()
        {
            var isBlue = _isMine;

            if (InGameManager.Get().playType == PLAY_TYPE.CO_OP)
            {
                isBlue = _isBottomPlayer;
            }

            if (_arrMeshRenderer == null)
            {
                _arrMeshRenderer = GetComponentsInChildren <MeshRenderer>();
            }
            foreach (var m in _arrMeshRenderer)
            {
                m.material = arrMaterial[isBlue ? 0 : 1];
            }

            if (_arrSkinnedMeshRenderers == null)
            {
                _arrSkinnedMeshRenderers = GetComponentsInChildren <SkinnedMeshRenderer>();
            }
            foreach (var m in _arrSkinnedMeshRenderers)
            {
                m.material = arrMaterial[isBlue ? 0 : 1];
            }
        }
Example #2
0
 private void Awake()
 {
     _ingameManager = FindObjectOfType <InGameManager>();
 }