void OnEnable() { tileSelectionState = new TileSelectionState(target as TileMap); tilePainterState = new TilePainterState(); tileRaiserState = new TileRaiserState(target as TileMap); tileMaterialState = new TileMaterialState(); tileRotateState = new TileRotateState(); tilePlaceObjectState = new TilePlaceObjectState(target as TileMap); currentState = tileSelectionState; materialIcon = FindAssets.GetMaterialIcon(); selectIcon = Resources.Load("Icons/select_icon") as Texture; rotateIcon = Resources.Load("Icons/rotate_icon") as Texture; placeIcon = Resources.Load("Icons/place_icon") as Texture; raiseIcon = Resources.Load("Icons/raise_icon") as Texture; paintIcon = Resources.Load("Icons/paint_icon") as Texture; }
public void ChangeState(TileEditorState newState, TileEditorState currState) { currentState = newState; }