Ejemplo n.º 1
0
    void OnEnable()
    {
        _target = target as GameplayArea;
        _verts = new Vector3[4];

        _sizeProperty = serializedObject.FindProperty("_size");
        _backgroundColorProperty = serializedObject.FindProperty("_backgroundColor");
    }
 public GameplayAreaDataControl(MapSceneDataControl mapSceneDataControl)
 {
     this.mapSceneDataControl = mapSceneDataControl;
     this.mapScene            = mapSceneDataControl.getContent() as MapScene;
     this.gameplayArea        = new GameplayArea
     {
         UsesGameplayArea   = mapScene.UsesGameplayArea,
         BoundingBox        = mapScene.GameplayArea,
         TileMetaIdentifier = mapScene.TileMetaIdentifier
     };
 }
Ejemplo n.º 3
0
        private void Start()
        {
            var minimapGo = GameObject.FindGameObjectWithTag("Minimap");
            if (!minimapGo)
                throw new NullReferenceException("no object was found with the 'Minimap' tag. Check it exists and is written correctly");

            _minimapUiPanel = minimapGo.GetComponent<RectTransform>();
            _gameplayArea = FindObjectOfType<GameplayArea>();

            _minimapUiPanel = transform.parent.transform as RectTransform;

            _topRightBottomLeft[0] = _gameplayArea.transform.position + new Vector3(_gameplayArea.Size, 0, _gameplayArea.Size) * .5f;
            _topRightBottomLeft[1] = _gameplayArea.transform.position - new Vector3(_gameplayArea.Size, 0, _gameplayArea.Size) * .5f;
        }
        private void OnEnable()
        {
            _target = target as FogOfWarManager;

            _probeMaskProperty = serializedObject.FindProperty("probeableLayers");
            _ignoreMaskProperty = serializedObject.FindProperty("ignoredLayers");

            _gameplayArea   = FindObjectOfType<GameplayArea>();

            _groundLayer    = LayerMask.NameToLayer("Ground");
            _LoSBlockLayer  = LayerMask.NameToLayer("SightBlock");
            _currentState = State.Idle;

            TryFindFogDataAsset();
        }