Ejemplo n.º 1
0
	public void DownGrade()
	{
		switch (Kind)
		{
			case Tile_Manager.Cover_Kind.Debris:
				View = View_Kind.None;
				Kind = Tile_Manager.Cover_Kind.Default;
				_Tile.TileMap[X][Y] = Tile_Manager.Cover_Kind.Default;
                Destroy(_Obstacle);
				break;
			case Tile_Manager.Cover_Kind.HalfCover:
				View = View_Kind.Low;
				Kind = Tile_Manager.Cover_Kind.Debris;
				_Tile.TileMap[X][Y] = Tile_Manager.Cover_Kind.Debris;
                Destroy(_Obstacle);
                _Obstacle = Instantiate(Obstacle_Manager.Obstacles[0],transform);
                Prev_Highlighted = orginal_color;
				break;
			case Tile_Manager.Cover_Kind.HighCover:
				View = View_Kind.Half;
				Kind = Tile_Manager.Cover_Kind.HalfCover;
				_Tile.TileMap[X][Y] = Tile_Manager.Cover_Kind.HalfCover;
                Destroy(_Obstacle);
                _Obstacle = Instantiate(Obstacle_Manager.Obstacles[1], transform);
				break;
			default:
				break;
		}

        if (_Obstacle != null) _obstacle = _Obstacle.GetComponent<Obstacle>();
        else _obstacle = null;
    }
Ejemplo n.º 2
0
    public void LateStart()
    {
        

        Kind = _Tile.TileMap[X][Y];
        if (_Obstacle != null) return;

        switch(Kind)
        {
            case Tile_Manager.Cover_Kind.CanNot:
            case Tile_Manager.Cover_Kind.Default:
            case Tile_Manager.Cover_Kind.Others:
                View = View_Kind.None;
                break;
            case Tile_Manager.Cover_Kind.Debris:
                View = View_Kind.Low;
                _Obstacle = Instantiate(Obstacle_Manager.Obstacles[0], transform);
                break;
            case Tile_Manager.Cover_Kind.HalfCover:
                _Obstacle = Instantiate(Obstacle_Manager.Obstacles[1], transform);
                View = View_Kind.Half;
                break;
            case Tile_Manager.Cover_Kind.HighCover:
                _Obstacle = Instantiate(Obstacle_Manager.Obstacles[2], transform);
                View = View_Kind.Full;
                break;
        }

        if (_Obstacle != null)
        {
            _obstacle = _Obstacle.GetComponent<Obstacle>();
            _obstacle.Change();
        }

        //gameObject.layer = 9;
        CompleteStart = true;
    }