-
Notifications
You must be signed in to change notification settings - Fork 1
/
document.tex
281 lines (239 loc) · 9.21 KB
/
document.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
%%This is a very basic article template.
%%There is just one section and two subsections.
\documentclass[11pt,footinclude=true,headinclude=true]{scrbook}
% raggedbottom avoids page content to get stretched
\raggedbottom
\usepackage[paperwidth=7.50in, paperheight=9.25in, top=1.6cm, bottom=1.6cm,
outer=2cm, inner=2.1cm,includefoot, includehead]{geometry}
%7.50 x 9.25
%235 x 191mm
%margins:
\usepackage[utf8]{inputenc}
\renewcommand*\rmdefault{ppl}
%\documentclass[10pt,a4paper,footinclude=true,headinclude=true]{scrreprt}
%\documentclass{scrreprt}
% KOMA-Script book
\usepackage{graphicx}
\usepackage{float}
%create an index
\usepackage{makeidx}
\makeindex
%\usepackage{hyperref}
%\usepackage[hyphens]{url}
%http://tex.stackexchange.com/questions/3033/forcing-linebreaks-in-url
\PassOptionsToPackage{hyphens}{url}\usepackage[colorlinks=true, linkcolor =
MidnightBlue, urlcolor = MidnightBlue, citecolor = MidnightBlue]{hyperref}
\usepackage[hyphenbreaks]{breakurl}
%\usepackage[T1]{fontenc}
%\usepackage{lipsum}
%\usepackage[linedheaders,parts,pdfspacing]{classicthesis} % ,manychapters
%\usepackage[osf]{libertine}
\usepackage{amsthm}
%\usepackage{applekeys}
\linespread{1.2}
%%Variables
%http://tex.stackexchange.com/questions/10377/texttt-overfull-hbox-problem
\usepackage{microtype}
\usepackage[htt]{hyphenat}
\newcommand{\cocos}{Cocos2D}
\newcommand{\spriteb}{SpriteBuilder}
\newcommand{\SB}{SpriteBuilder}
\newcommand{\xcode}{Xcode}
\newcommand{\ccnode}{CCNode}
\newcommand{\ccsprite}{CCSprite}
\newcommand{\ccscene}{CCScene}
\newcommand{\ccaction}{CCAction}
\newcommand{\ccdirector}{CCDirector}
\newcommand{\cclabel}{CCLabelTTF}
\newcommand{\ccbfile}{CCB File}
\newcommand{\inlinecode}{\texttt}
%http://tex.stackexchange.com/questions/59122/how-to-avoid-using-sloppy-document-wide-to-fix-overfull-hbox-problems
\setlength{\emergencystretch}{10pt}
\newcommand{\filemention}{\textit}
\newcommand{\imagesize}{width=0.9\linewidth}
%% Paragraph settings
\setlength{\parindent}{0em}
\setlength{\parskip}{1em}
%% Setup code highlighting
\usepackage{listings}
\usepackage[T1]{fontenc}
%\usepackage[scaled]{beramono}
%\usepackage{tgadventor}
\usepackage[usenames,dvipsnames]{color}
\usepackage[colorinlistoftodos, textwidth=4cm, shadow]{todonotes}
\usepackage{verbatim}
\definecolor{lineno}{rgb}{0.5,0.5,0.5}
\definecolor{code}{rgb}{0,0.1,0.6}
\definecolor{keyword}{rgb}{0.5,0.1,0.1}
\definecolor{titlebox}{rgb}{0.85,0.85,0.85}
\definecolor{download}{rgb}{0.8,0.1,0.5}
\definecolor{title}{rgb}{0.4,0.4,0.4}
\definecolor{pink} {rgb}{0.67, 0.05, 0.57} % keywords
\definecolor{red} {rgb}{0.87, 0.20, 0.00} % strings
\definecolor{green} {rgb}{0.00, 0.47, 0.00} % comments
\definecolor{violet}{rgb}{0.41, 0.12, 0.61} % classes
\definecolor{blue} {rgb}{0.21, 0.00, 0.44} % functions
\definecolor{brown} {rgb}{0.39, 0.22, 0.13} % brown
\lstdefinelanguage{Swift}[Objective]{C} {
morekeywords={id, Class, SEL, IMP, BOOL, nil, Nil, NO, YES,
oneway, in, out, inout, bycopy, byref,
self, super, _cmd,
@required, @optional,
@try, @throw, @catch, @finally,
@synchronized, @property, @synthesize, @dynamic, func, var,
let, class, extension, true, false, if, weak, private, set,
@objc, public, override, private},
moredelim=[s][color{red}]{@"}{"}, moredelim=[s][color{red}]{<}{>} }
\lstdefinestyle{Xcode} {
language = Swift,
basicstyle = \ttfamily\small,
identifierstyle = \color{black},
commentstyle = \color{green},
keywordstyle = \color{pink},
stringstyle = \color{red},
directivestyle = \color{brown},
extendedchars = true,
tabsize = 4,
showspaces = false,
showstringspaces = false,
breakautoindent = true,
flexiblecolumns = true,
keepspaces = true,
stepnumber = 0,
xleftmargin = 0pt}
\lstset{
style = Xcode,
breaklines=true,
frame=none,
escapeinside={(*@}{@*)}
}
\usepackage{pdftexcmds}
% http://tex.stackexchange.com/questions/19646/how-to-typeset-special-apple-mac-keyboard-symbols
%\usepackage{menukeys}
\makeatletter
\gdef\lst@SkipOrPrintLabel{%
\ifnum\lst@skipnumbers=\z@
\global\advance\lst@skipnumbers-\lst@stepnumber\relax
\lst@PlaceNumber
\lst@numberfirstlinefalse
\else
\lst@ifnumberfirstline
{\def\thelstnumber{Line \@arabic\c@lstnumber}\lst@PlaceNumber}%
\lst@numberfirstlinefalse
\else
{\def\thelstnumber{-}\lst@PlaceNumber}%
\fi
\fi
\global\advance\lst@skipnumbers\@ne}%
\def\lst@maketitle#1{
\vskip\abovecaptionskip
\colorbox{titlebox}{
\scriptsize
\color{download}\ttfamily\href{http://example.com/#1}{Download}
\color{title}\sffamily\bfseries#1}
\vskip\belowcaptionskip}
\makeatother
%%
\usepackage{wrapfig}
\usepackage[framemethod=tikz]{mdframed}
\usepackage{framed, color}
\definecolor{shadecolor}{rgb}{1.0,0.8,0.3}
\usetikzlibrary{calc}
\usepackage{kantlipsum}
\usepackage{dingbat}%\eye and \leftpointright
\newcounter{error}[chapter]
\renewcommand*\theerror{\thechapter.\arabic{error}}
\newmdenv[nobreak=true,middlelinewidth=.8pt,
frametitlefont=\bfseries,
leftmargin=.3cm,rightmargin=.3cm, innerleftmargin=2cm,
skipabove=\topsep,skipbelow=\topsep,
singleextra={\path let \p1=(P), \p2=(O) in ($(\x2,0)+0.5*(2,\y1)$) node[ lampsymbol] {\leftpointright};
\draw[line width=.8pt,white,] ($(O|-P)+(.2cm,0)$) -- ($(P)-(.2cm,0)$);
\draw[line width=.8pt,white,] ($(O)+(.2cm,0)$) -- ($(P|-O)-(.2cm,0)$);
},%
]{detailsold}
\usepackage[most]{tcolorbox}
\newtcolorbox{details}[1][]{breakable,enhanced, arc=0mm, coltitle = black,
,left=22mm, top=6mm, colbacktitle=gray!30,colframe=gray!30, colback=white,
title=#1, attach boxed title to top left={yshift=-2ex,xshift=12ex}, height from
= 2.7cm to 99cm, overlay unbroken and first={\node[anchor=north west,outer
sep=10pt] at (frame.north west) {\includegraphics[width=16mm]{images/note.png}}; }}
\definecolor{light-gray}{gray}{0.7}
%change leftbar color:
\renewenvironment{leftbar}[1][\hsize]
{%
\def\FrameCommand
{%
{\color{light-gray}\vrule width 4pt}%
\hspace{14pt}%must no space.
}%
\MakeFramed{\hsize#1\advance\hsize-\width\FrameRestore}%
}
{\endMakeFramed}
%bold lines in
% listings:http://tex.stackexchange.com/questions/63845/boldface-and-subscripts-in-verbatim-mode
\usepackage{fancyvrb}
\usepackage{pdfpages}
\begin{document}
\include{Chapters/0_Cover}
\cleardoublepage{}
\tableofcontents{}
%http://tex.stackexchange.com/questions/111338/inserting-a-blank-left-starting-page-in-a-koma-script-book
\KOMAoptions{open=left}
\include{Chapters/2_About_Book}
\include{Chapters/3_Introduction_SpriteBuilder_Cocos2D}
\include{Chapters/4_Assets_SpriteBuilder}
\include{Chapters/5_User_Interaction}
\include{Chapters/6_Scene_Graphs_Transforms}
\include{Chapters/7_User_Interfaces}
\include{Chapters/8_Persistence_Leaderboards}
\include{Chapters/9_Effects_and_Animations}
\include{Chapters/10_What_Next}
% \include{Chapters/Cocos2D}
% \newpage
% \include{Chapters/SpriteBuilder}
% \newpage
% \include{Chapters/Sprites}
% \newpage
% \include{Chapters/Animation_Movement}
% \newpage
% \include{Chapters/UserInteraction}
% \newpage
% \include{Chapters/UserInterfaces}
% \newpage
% \include{Chapters/Physics}
% \newpage
% \include{Chapters/ParticleEffects}
% \newpage
% \include{Chapters/Audio}
% \newpage
% \include{Chapters/Tilemaps}
% \chapter{Appendix A: Writing your own SpriteBuilder Plugins}
% \chapter{Appendix B: Particle Parameters}
% \begin{table}
% \begin{tabular}{lll}
% Mode & Parameter & Description \\
% Gravity Mode (Mode A) & ~ & ~ \\ \hline
% ~ & Gravity & a \\
% ~ & Direction & a \\
% ~ & Speed & a \\
% ~ & Tangential acceleration & a \\
% ~ & Radial acceleration & ~ \\
% Radius Mode (Mode B) & ~ & ~ \\
% ~ & Start Radius & a \\
% ~ & End Radius & a \\
% ~ & Rotate & a \\
% Properties for all Modes & ~ & ~ \\
% ~ & Life & a \\
% ~ & Start spin & a \\
% ~ & End spin & a \\
% ~ & Start size & a \\
% ~ & End size & a \\
% ~ & Start color & a \\
% ~ & End color & a \\
% ~ & Life & a \\
% ~ & Blending function & a \\
% \end{tabular}
% \end{table}
%\printindex
\end{document}