Add CT3536 Games Programming
This commit is contained in:
Binary file not shown.
Binary file not shown.
@ -0,0 +1,79 @@
|
||||
%! TeX program = lualatex
|
||||
\documentclass[a4paper, 11pt]{article}
|
||||
|
||||
|
||||
% packages
|
||||
\usepackage{microtype} % Slightly tweak font spacing for aesthetics
|
||||
\usepackage[english]{babel} % Language hyphenation and typographical rules
|
||||
\usepackage[final, colorlinks = false, urlcolor = cyan]{hyperref}
|
||||
\usepackage{changepage} % adjust margins on the fly
|
||||
\usepackage{fontspec}
|
||||
|
||||
\usepackage{minted}
|
||||
\usepackage{xcolor}
|
||||
|
||||
\usepackage{pgfplots}
|
||||
\pgfplotsset{width=\textwidth,compat=1.9}
|
||||
|
||||
\usepackage{caption}
|
||||
\newenvironment{code}{\captionsetup{type=listing}}{}
|
||||
|
||||
\usepackage[yyyymmdd]{datetime}
|
||||
\renewcommand{\dateseparator}{-}
|
||||
\setmainfont{EB Garamond}
|
||||
\setmonofont[Scale=MatchLowercase]{Deja Vu Sans Mono}
|
||||
|
||||
\usepackage{titlesec}
|
||||
% \titleformat{\section}{\LARGE\bfseries}{}{}{}[\titlerule]
|
||||
% \titleformat{\subsection}{\Large\bfseries}{}{0em}{}
|
||||
% \titlespacing{\subsection}{0em}{-0.7em}{0em}
|
||||
%
|
||||
% \titleformat{\subsubsection}{\large\bfseries}{}{0em}{$\bullet$ }
|
||||
% \titlespacing{\subsubsection}{1em}{-0.7em}{0em}
|
||||
|
||||
% margins
|
||||
\addtolength{\hoffset}{-2.25cm}
|
||||
\addtolength{\textwidth}{4.5cm}
|
||||
\addtolength{\voffset}{-3.25cm}
|
||||
\addtolength{\textheight}{5cm}
|
||||
\setlength{\parskip}{0pt}
|
||||
\setlength{\parindent}{0in}
|
||||
% \setcounter{secnumdepth}{0}
|
||||
|
||||
\begin{document}
|
||||
\hrule \medskip
|
||||
\begin{minipage}{0.295\textwidth}
|
||||
\raggedright
|
||||
\footnotesize
|
||||
\textbf{Name:} Andrew Hayes \\
|
||||
\textbf{E-mail:} \href{mailto://a.hayes18@universityofgalway.ie}{a.hayes18@universityofgalway.ie} \hfill\\
|
||||
\textbf{ID:} 21321503 \hfill
|
||||
\end{minipage}
|
||||
\begin{minipage}{0.4\textwidth}
|
||||
\centering
|
||||
\vspace{0.4em}
|
||||
\Large
|
||||
\textbf{CT3536} \\
|
||||
\end{minipage}
|
||||
\begin{minipage}{0.295\textwidth}
|
||||
\raggedleft
|
||||
\today
|
||||
\end{minipage}
|
||||
\medskip\hrule
|
||||
\begin{center}
|
||||
\normalsize
|
||||
\textbf{Assignment 02}
|
||||
\end{center}
|
||||
\hrule
|
||||
|
||||
\begin{code}
|
||||
\inputminted[texcl, mathescape, breaklines, frame=single]{csharp}{../code/GameManagerScript.cs}
|
||||
\caption{\texttt{GameManagerScript.cs}}
|
||||
\end{code}
|
||||
|
||||
\begin{code}
|
||||
\inputminted[texcl, mathescape, breaklines, frame=single]{csharp}{../code/AsteroidScript.cs}
|
||||
\caption{\texttt{AsteroidScript.cs}}
|
||||
\end{code}
|
||||
|
||||
\end{document}
|
@ -0,0 +1,57 @@
|
||||
\begin{Verbatim}[commandchars=\\\{\},codes={\catcode`\$=3\catcode`\^=7\catcode`\_=8\relax}]
|
||||
\PYG{c+c1}{// Andrew Hayes, ID: 21321503}
|
||||
\PYG{c+c1}{// some of the comments here are quite obvious, and are just here for my own learning purposes}
|
||||
\PYG{k}{using}\PYG{+w}{ }\PYG{n+nn}{System.Collections}\PYG{p}{;}
|
||||
\PYG{k}{using}\PYG{+w}{ }\PYG{n+nn}{System.Collections.Generic}\PYG{p}{;}
|
||||
\PYG{k}{using}\PYG{+w}{ }\PYG{n+nn}{UnityEngine}\PYG{p}{;}
|
||||
|
||||
\PYG{k}{public}\PYG{+w}{ }\PYG{k}{class}\PYG{+w}{ }\PYG{n+nc}{GameManager}\PYG{+w}{ }\PYG{p}{:}\PYG{+w}{ }\PYG{n}{MonoBehaviour}\PYG{+w}{ }\PYG{p}{\PYGZob{}}
|
||||
\PYG{+w}{ }\PYG{c+c1}{// inspector settings}
|
||||
\PYG{+w}{ }\PYG{k}{public}\PYG{+w}{ }\PYG{n}{GameObject}\PYG{+w}{ }\PYG{n}{mars}\PYG{p}{;}
|
||||
\PYG{+w}{ }\PYG{k}{public}\PYG{+w}{ }\PYG{n}{GameObject}\PYG{+w}{ }\PYG{n}{phobos}\PYG{p}{;}\PYG{+w}{ }
|
||||
\PYG{+w}{ }\PYG{k}{public}\PYG{+w}{ }\PYG{n}{GameObject}\PYG{+w}{ }\PYG{n}{deimos}\PYG{p}{;}
|
||||
\PYG{+w}{ }\PYG{k}{public}\PYG{+w}{ }\PYG{n}{GameObject}\PYG{+w}{ }\PYG{n}{asteroid}\PYG{p}{;}
|
||||
|
||||
\PYG{+w}{ }\PYG{c+c1}{// speed that the camera moves around mars on arrow keypress}
|
||||
\PYG{+w}{ }\PYG{k}{public}\PYG{+w}{ }\PYG{k+kt}{float}\PYG{+w}{ }\PYG{n}{cameraSpeed}\PYG{+w}{ }\PYG{o}{=}\PYG{+w}{ }\PYG{l+m}{500}\PYG{p}{;}
|
||||
|
||||
\PYG{+w}{ }\PYG{c+c1}{// Start is called before the first frame update}
|
||||
\PYG{+w}{ }\PYG{k}{void}\PYG{+w}{ }\PYG{n+nf}{Start}\PYG{p}{()}\PYG{+w}{ }\PYG{p}{\PYGZob{}}
|
||||
\PYG{+w}{ }\PYG{c+c1}{// set position of mars object and point camera at it}
|
||||
\PYG{+w}{ }\PYG{n}{mars}\PYG{p}{.}\PYG{n}{transform}\PYG{p}{.}\PYG{n}{position}\PYG{+w}{ }\PYG{o}{=}\PYG{+w}{ }\PYG{k}{new}\PYG{+w}{ }\PYG{n}{Vector3}\PYG{p}{(}\PYG{l+m}{0}\PYG{p}{,}\PYG{l+m}{0}\PYG{p}{,}\PYG{l+m}{0}\PYG{p}{);}
|
||||
\PYG{+w}{ }\PYG{n}{mars}\PYG{p}{.}\PYG{n}{transform}\PYG{p}{.}\PYG{n}{rotation}\PYG{+w}{ }\PYG{o}{=}\PYG{+w}{ }\PYG{n}{Quaternion}\PYG{p}{.}\PYG{n}{Euler}\PYG{p}{(}\PYG{k}{new}\PYG{+w}{ }\PYG{n}{Vector3}\PYG{p}{(}\PYG{l+m}{270}\PYG{p}{,}\PYG{l+m}{0}\PYG{p}{,}\PYG{l+m}{0}\PYG{p}{));}\PYG{+w}{ }\PYG{c+c1}{// make it so mars' north pole points up}
|
||||
\PYG{+w}{ }\PYG{n}{Camera}\PYG{p}{.}\PYG{n}{main}\PYG{p}{.}\PYG{n}{transform}\PYG{p}{.}\PYG{n}{position}\PYG{+w}{ }\PYG{o}{=}\PYG{+w}{ }\PYG{k}{new}\PYG{+w}{ }\PYG{n}{Vector3}\PYG{p}{(}\PYG{l+m}{0}\PYG{p}{,}\PYG{l+m}{0}\PYG{p}{,}\PYG{o}{\PYGZhy{}}\PYG{l+m}{100}\PYG{p}{);}
|
||||
\PYG{+w}{ }\PYG{n}{Camera}\PYG{p}{.}\PYG{n}{main}\PYG{p}{.}\PYG{n}{transform}\PYG{p}{.}\PYG{n}{LookAt}\PYG{p}{(}\PYG{n}{mars}\PYG{p}{.}\PYG{n}{transform}\PYG{p}{);}
|
||||
|
||||
\PYG{+w}{ }\PYG{c+c1}{// before this can run, you need to manually add a rigid body with 0 angular velocity and no gravity in the UI}
|
||||
\PYG{+w}{ }\PYG{c+c1}{// start mars rotating }
|
||||
\PYG{+w}{ }\PYG{n}{mars}\PYG{p}{.}\PYG{n}{GetComponent}\PYG{o}{\PYGZlt{}}\PYG{n}{Rigidbody}\PYG{o}{\PYGZgt{}}\PYG{p}{().}\PYG{n}{AddTorque}\PYG{p}{(}\PYG{k}{new}\PYG{+w}{ }\PYG{n}{Vector3}\PYG{p}{(}\PYG{l+m}{0}\PYG{p}{,}\PYG{l+m}{20}\PYG{p}{,}\PYG{l+m}{0}\PYG{p}{));}
|
||||
\PYG{+w}{ }\PYG{p}{\PYGZcb{}}
|
||||
|
||||
\PYG{+w}{ }\PYG{k}{void}\PYG{+w}{ }\PYG{n+nf}{Update}\PYG{p}{()}\PYG{+w}{ }\PYG{p}{\PYGZob{}}
|
||||
\PYG{+w}{ }\PYG{c+c1}{// rotate phobos and deimos a little each frame }
|
||||
\PYG{+w}{ }\PYG{n}{phobos}\PYG{p}{.}\PYG{n}{transform}\PYG{p}{.}\PYG{n}{RotateAround}\PYG{p}{(}\PYG{n}{mars}\PYG{p}{.}\PYG{n}{transform}\PYG{p}{.}\PYG{n}{position}\PYG{p}{,}\PYG{+w}{ }\PYG{n}{Vector3}\PYG{p}{.}\PYG{n}{up}\PYG{p}{,}\PYG{+w}{ }\PYG{l+m}{32}\PYG{o}{*}\PYG{n}{Time}\PYG{p}{.}\PYG{n}{deltaTime}\PYG{p}{);}
|
||||
\PYG{+w}{ }\PYG{n}{deimos}\PYG{p}{.}\PYG{n}{transform}\PYG{p}{.}\PYG{n}{RotateAround}\PYG{p}{(}\PYG{n}{mars}\PYG{p}{.}\PYG{n}{transform}\PYG{p}{.}\PYG{n}{position}\PYG{p}{,}\PYG{+w}{ }\PYG{n}{Vector3}\PYG{p}{.}\PYG{n}{up}\PYG{p}{,}\PYG{+w}{ }\PYG{l+m}{8}\PYG{o}{*}\PYG{n}{Time}\PYG{p}{.}\PYG{n}{deltaTime}\PYG{p}{);}
|
||||
|
||||
\PYG{+w}{ }\PYG{c+c1}{// control the camera's position using the arrow keys}
|
||||
\PYG{+w}{ }\PYG{k}{if}\PYG{+w}{ }\PYG{p}{(}\PYG{n}{Input}\PYG{p}{.}\PYG{n}{GetKey}\PYG{p}{(}\PYG{n}{KeyCode}\PYG{p}{.}\PYG{n}{LeftArrow}\PYG{p}{))}\PYG{+w}{ }\PYG{p}{\PYGZob{}}
|
||||
\PYG{+w}{ }\PYG{n}{Camera}\PYG{p}{.}\PYG{n}{main}\PYG{p}{.}\PYG{n}{transform}\PYG{p}{.}\PYG{n}{RotateAround}\PYG{p}{(}\PYG{n}{Vector3}\PYG{p}{.}\PYG{n}{zero}\PYG{p}{,}\PYG{+w}{ }\PYG{n}{Vector3}\PYG{p}{.}\PYG{n}{up}\PYG{p}{,}\PYG{+w}{ }\PYG{n}{cameraSpeed}\PYG{+w}{ }\PYG{o}{*}\PYG{+w}{ }\PYG{n}{Time}\PYG{p}{.}\PYG{n}{deltaTime}\PYG{p}{);}
|
||||
\PYG{+w}{ }\PYG{p}{\PYGZcb{}}
|
||||
\PYG{+w}{ }\PYG{k}{else}\PYG{+w}{ }\PYG{n+nf}{if}\PYG{+w}{ }\PYG{p}{(}\PYG{n}{Input}\PYG{p}{.}\PYG{n}{GetKey}\PYG{p}{(}\PYG{n}{KeyCode}\PYG{p}{.}\PYG{n}{RightArrow}\PYG{p}{))}\PYG{+w}{ }\PYG{p}{\PYGZob{}}\PYG{+w}{ }
|
||||
\PYG{+w}{ }\PYG{n}{Camera}\PYG{p}{.}\PYG{n}{main}\PYG{p}{.}\PYG{n}{transform}\PYG{p}{.}\PYG{n}{RotateAround}\PYG{p}{(}\PYG{n}{Vector3}\PYG{p}{.}\PYG{n}{zero}\PYG{p}{,}\PYG{+w}{ }\PYG{n}{Vector3}\PYG{p}{.}\PYG{n}{up}\PYG{p}{,}\PYG{+w}{ }\PYG{o}{\PYGZhy{}}\PYG{n}{cameraSpeed}\PYG{+w}{ }\PYG{o}{*}\PYG{+w}{ }\PYG{n}{Time}\PYG{p}{.}\PYG{n}{deltaTime}\PYG{p}{);}
|
||||
\PYG{+w}{ }\PYG{p}{\PYGZcb{}}
|
||||
\PYG{+w}{ }\PYG{k}{else}\PYG{+w}{ }\PYG{n+nf}{if}\PYG{+w}{ }\PYG{p}{(}\PYG{n}{Input}\PYG{p}{.}\PYG{n}{GetKey}\PYG{p}{(}\PYG{n}{KeyCode}\PYG{p}{.}\PYG{n}{UpArrow}\PYG{p}{))}\PYG{+w}{ }\PYG{p}{\PYGZob{}}
|
||||
\PYG{+w}{ }\PYG{n}{Camera}\PYG{p}{.}\PYG{n}{main}\PYG{p}{.}\PYG{n}{transform}\PYG{p}{.}\PYG{n}{RotateAround}\PYG{p}{(}\PYG{n}{Vector3}\PYG{p}{.}\PYG{n}{zero}\PYG{p}{,}\PYG{+w}{ }\PYG{n}{Vector3}\PYG{p}{.}\PYG{n}{right}\PYG{p}{,}\PYG{+w}{ }\PYG{n}{cameraSpeed}\PYG{+w}{ }\PYG{o}{*}\PYG{+w}{ }\PYG{n}{Time}\PYG{p}{.}\PYG{n}{deltaTime}\PYG{p}{);}
|
||||
\PYG{+w}{ }\PYG{p}{\PYGZcb{}}
|
||||
\PYG{+w}{ }\PYG{k}{else}\PYG{+w}{ }\PYG{n+nf}{if}\PYG{+w}{ }\PYG{p}{(}\PYG{n}{Input}\PYG{p}{.}\PYG{n}{GetKey}\PYG{p}{(}\PYG{n}{KeyCode}\PYG{p}{.}\PYG{n}{DownArrow}\PYG{p}{))}\PYG{+w}{ }\PYG{p}{\PYGZob{}}
|
||||
\PYG{+w}{ }\PYG{n}{Camera}\PYG{p}{.}\PYG{n}{main}\PYG{p}{.}\PYG{n}{transform}\PYG{p}{.}\PYG{n}{RotateAround}\PYG{p}{(}\PYG{n}{Vector3}\PYG{p}{.}\PYG{n}{zero}\PYG{p}{,}\PYG{+w}{ }\PYG{n}{Vector3}\PYG{p}{.}\PYG{n}{right}\PYG{p}{,}\PYG{+w}{ }\PYG{o}{\PYGZhy{}}\PYG{n}{cameraSpeed}\PYG{+w}{ }\PYG{o}{*}\PYG{+w}{ }\PYG{n}{Time}\PYG{p}{.}\PYG{n}{deltaTime}\PYG{p}{);}
|
||||
\PYG{+w}{ }\PYG{p}{\PYGZcb{}}
|
||||
|
||||
\PYG{+w}{ }\PYG{c+c1}{// randomly spawn new asteroids}
|
||||
\PYG{+w}{ }\PYG{k}{if}\PYG{+w}{ }\PYG{p}{(}\PYG{n}{Random}\PYG{p}{.}\PYG{n}{Range}\PYG{p}{(}\PYG{l+m}{1}\PYG{p}{,}\PYG{l+m}{180}\PYG{p}{)}\PYG{+w}{ }\PYG{o}{==}\PYG{+w}{ }\PYG{l+m}{1}\PYG{p}{)}\PYG{+w}{ }\PYG{p}{\PYGZob{}}\PYG{+w}{ }\PYG{c+c1}{// assuming Update() is called 60 times per second, want to spawn a new asteroid on average once every 3 seconds}
|
||||
\PYG{+w}{ }\PYG{n}{Instantiate}\PYG{p}{(}\PYG{n}{asteroid}\PYG{p}{);}\PYG{+w}{ }\PYG{c+c1}{// instantiating asteroid prefab}
|
||||
\PYG{+w}{ }\PYG{p}{\PYGZcb{}}
|
||||
\PYG{+w}{ }\PYG{p}{\PYGZcb{}}
|
||||
\PYG{p}{\PYGZcb{}}
|
||||
|
||||
\end{Verbatim}
|
@ -0,0 +1,36 @@
|
||||
\begin{Verbatim}[commandchars=\\\{\},codes={\catcode`\$=3\catcode`\^=7\catcode`\_=8\relax}]
|
||||
\PYG{k}{using}\PYG{+w}{ }\PYG{n+nn}{System.Collections}\PYG{p}{;}
|
||||
\PYG{k}{using}\PYG{+w}{ }\PYG{n+nn}{System.Collections.Generic}\PYG{p}{;}
|
||||
\PYG{k}{using}\PYG{+w}{ }\PYG{n+nn}{UnityEngine}\PYG{p}{;}
|
||||
|
||||
\PYG{k}{public}\PYG{+w}{ }\PYG{k}{class}\PYG{+w}{ }\PYG{n+nc}{AsteroidScript}\PYG{+w}{ }\PYG{p}{:}\PYG{+w}{ }\PYG{n}{MonoBehaviour}
|
||||
\PYG{p}{\PYGZob{}}
|
||||
\PYG{+w}{ }\PYG{k}{public}\PYG{+w}{ }\PYG{n}{GameObject}\PYG{+w}{ }\PYG{n}{asteroid}\PYG{p}{;}
|
||||
|
||||
\PYG{+w}{ }\PYG{c+c1}{// Start is called before the first frame update}
|
||||
\PYG{+w}{ }\PYG{k}{void}\PYG{+w}{ }\PYG{n+nf}{Start}\PYG{p}{()}
|
||||
\PYG{+w}{ }\PYG{p}{\PYGZob{}}
|
||||
\PYG{+w}{ }\PYG{c+c1}{// set asteroid start position to a random plae to the left of mars}
|
||||
\PYG{+w}{ }\PYG{n}{asteroid}\PYG{p}{.}\PYG{n}{transform}\PYG{p}{.}\PYG{n}{position}\PYG{+w}{ }\PYG{o}{=}\PYG{+w}{ }\PYG{k}{new}\PYG{+w}{ }\PYG{n}{Vector3}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m}{500}\PYG{p}{,}\PYG{n}{Random}\PYG{p}{.}\PYG{n}{Range}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m}{250}\PYG{p}{,}\PYG{+w}{ }\PYG{l+m}{250}\PYG{p}{),}\PYG{n}{Random}\PYG{p}{.}\PYG{n}{Range}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m}{250}\PYG{p}{,}\PYG{l+m}{250}\PYG{p}{));}
|
||||
|
||||
\PYG{+w}{ }\PYG{c+c1}{// adding force to the asteroir}
|
||||
\PYG{+w}{ }\PYG{n}{asteroid}\PYG{p}{.}\PYG{n}{GetComponent}\PYG{o}{\PYGZlt{}}\PYG{n}{Rigidbody}\PYG{o}{\PYGZgt{}}\PYG{p}{().}\PYG{n}{AddForce}\PYG{p}{(}\PYG{n}{Vector3}\PYG{p}{.}\PYG{n}{right}\PYG{+w}{ }\PYG{o}{*}\PYG{+w}{ }\PYG{l+m}{200000}\PYG{+w}{ }\PYG{o}{*}\PYG{+w}{ }\PYG{n}{Time}\PYG{p}{.}\PYG{n}{deltaTime}\PYG{p}{);}
|
||||
\PYG{+w}{ }\PYG{p}{\PYGZcb{}}
|
||||
|
||||
\PYG{+w}{ }\PYG{c+c1}{// Update is called once per frame}
|
||||
\PYG{+w}{ }\PYG{k}{void}\PYG{+w}{ }\PYG{n+nf}{Update}\PYG{p}{()}
|
||||
\PYG{+w}{ }\PYG{p}{\PYGZob{}}
|
||||
\PYG{+w}{ }\PYG{c+c1}{// destroy object if it goes off the right edge of the screen}
|
||||
\PYG{+w}{ }\PYG{n}{Vector3}\PYG{+w}{ }\PYG{n}{position}\PYG{+w}{ }\PYG{o}{=}\PYG{+w}{ }\PYG{n}{Camera}\PYG{p}{.}\PYG{n}{main}\PYG{p}{.}\PYG{n}{WorldToScreenPoint}\PYG{p}{(}\PYG{n}{transform}\PYG{p}{.}\PYG{n}{position}\PYG{p}{);}
|
||||
\PYG{+w}{ }\PYG{k}{if}\PYG{+w}{ }\PYG{p}{(}\PYG{n}{position}\PYG{p}{.}\PYG{n}{x}\PYG{+w}{ }\PYG{o}{\PYGZgt{}}\PYG{+w}{ }\PYG{n}{Screen}\PYG{p}{.}\PYG{n}{width}\PYG{p}{)}\PYG{+w}{ }\PYG{p}{\PYGZob{}}
|
||||
\PYG{+w}{ }\PYG{n}{Destroy}\PYG{p}{(}\PYG{n}{asteroid}\PYG{p}{);}
|
||||
\PYG{+w}{ }\PYG{p}{\PYGZcb{}}
|
||||
\PYG{+w}{ }
|
||||
\PYG{+w}{ }\PYG{p}{\PYGZcb{}}
|
||||
|
||||
\PYG{+w}{ }\PYG{c+c1}{// destroy asterod upon collisions}
|
||||
\PYG{+w}{ }\PYG{k}{void}\PYG{+w}{ }\PYG{n+nf}{OnCollisionEnter}\PYG{p}{()}\PYG{+w}{ }\PYG{p}{\PYGZob{}}
|
||||
\PYG{+w}{ }\PYG{n}{Destroy}\PYG{p}{(}\PYG{n}{asteroid}\PYG{p}{);}
|
||||
\PYG{+w}{ }\PYG{p}{\PYGZcb{}}
|
||||
\PYG{p}{\PYGZcb{}}
|
||||
\end{Verbatim}
|
@ -0,0 +1,102 @@
|
||||
|
||||
\makeatletter
|
||||
\def\PYG@reset{\let\PYG@it=\relax \let\PYG@bf=\relax%
|
||||
\let\PYG@ul=\relax \let\PYG@tc=\relax%
|
||||
\let\PYG@bc=\relax \let\PYG@ff=\relax}
|
||||
\def\PYG@tok#1{\csname PYG@tok@#1\endcsname}
|
||||
\def\PYG@toks#1+{\ifx\relax#1\empty\else%
|
||||
\PYG@tok{#1}\expandafter\PYG@toks\fi}
|
||||
\def\PYG@do#1{\PYG@bc{\PYG@tc{\PYG@ul{%
|
||||
\PYG@it{\PYG@bf{\PYG@ff{#1}}}}}}}
|
||||
\def\PYG#1#2{\PYG@reset\PYG@toks#1+\relax+\PYG@do{#2}}
|
||||
|
||||
\@namedef{PYG@tok@w}{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.73,0.73}{##1}}}
|
||||
\@namedef{PYG@tok@c}{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.24,0.48,0.48}{##1}}}
|
||||
\@namedef{PYG@tok@cp}{\def\PYG@tc##1{\textcolor[rgb]{0.61,0.40,0.00}{##1}}}
|
||||
\@namedef{PYG@tok@k}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\@namedef{PYG@tok@kp}{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\@namedef{PYG@tok@kt}{\def\PYG@tc##1{\textcolor[rgb]{0.69,0.00,0.25}{##1}}}
|
||||
\@namedef{PYG@tok@o}{\def\PYG@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
|
||||
\@namedef{PYG@tok@ow}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.67,0.13,1.00}{##1}}}
|
||||
\@namedef{PYG@tok@nb}{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\@namedef{PYG@tok@nf}{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.00,1.00}{##1}}}
|
||||
\@namedef{PYG@tok@nc}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.00,1.00}{##1}}}
|
||||
\@namedef{PYG@tok@nn}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.00,1.00}{##1}}}
|
||||
\@namedef{PYG@tok@ne}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.80,0.25,0.22}{##1}}}
|
||||
\@namedef{PYG@tok@nv}{\def\PYG@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
|
||||
\@namedef{PYG@tok@no}{\def\PYG@tc##1{\textcolor[rgb]{0.53,0.00,0.00}{##1}}}
|
||||
\@namedef{PYG@tok@nl}{\def\PYG@tc##1{\textcolor[rgb]{0.46,0.46,0.00}{##1}}}
|
||||
\@namedef{PYG@tok@ni}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.44,0.44,0.44}{##1}}}
|
||||
\@namedef{PYG@tok@na}{\def\PYG@tc##1{\textcolor[rgb]{0.41,0.47,0.13}{##1}}}
|
||||
\@namedef{PYG@tok@nt}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\@namedef{PYG@tok@nd}{\def\PYG@tc##1{\textcolor[rgb]{0.67,0.13,1.00}{##1}}}
|
||||
\@namedef{PYG@tok@s}{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
|
||||
\@namedef{PYG@tok@sd}{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
|
||||
\@namedef{PYG@tok@si}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.64,0.35,0.47}{##1}}}
|
||||
\@namedef{PYG@tok@se}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.67,0.36,0.12}{##1}}}
|
||||
\@namedef{PYG@tok@sr}{\def\PYG@tc##1{\textcolor[rgb]{0.64,0.35,0.47}{##1}}}
|
||||
\@namedef{PYG@tok@ss}{\def\PYG@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
|
||||
\@namedef{PYG@tok@sx}{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\@namedef{PYG@tok@m}{\def\PYG@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
|
||||
\@namedef{PYG@tok@gh}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.00,0.50}{##1}}}
|
||||
\@namedef{PYG@tok@gu}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.50,0.00,0.50}{##1}}}
|
||||
\@namedef{PYG@tok@gd}{\def\PYG@tc##1{\textcolor[rgb]{0.63,0.00,0.00}{##1}}}
|
||||
\@namedef{PYG@tok@gi}{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.52,0.00}{##1}}}
|
||||
\@namedef{PYG@tok@gr}{\def\PYG@tc##1{\textcolor[rgb]{0.89,0.00,0.00}{##1}}}
|
||||
\@namedef{PYG@tok@ge}{\let\PYG@it=\textit}
|
||||
\@namedef{PYG@tok@gs}{\let\PYG@bf=\textbf}
|
||||
\@namedef{PYG@tok@ges}{\let\PYG@bf=\textbf\let\PYG@it=\textit}
|
||||
\@namedef{PYG@tok@gp}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.00,0.50}{##1}}}
|
||||
\@namedef{PYG@tok@go}{\def\PYG@tc##1{\textcolor[rgb]{0.44,0.44,0.44}{##1}}}
|
||||
\@namedef{PYG@tok@gt}{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.27,0.87}{##1}}}
|
||||
\@namedef{PYG@tok@err}{\def\PYG@bc##1{{\setlength{\fboxsep}{\string -\fboxrule}\fcolorbox[rgb]{1.00,0.00,0.00}{1,1,1}{\strut ##1}}}}
|
||||
\@namedef{PYG@tok@kc}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\@namedef{PYG@tok@kd}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\@namedef{PYG@tok@kn}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\@namedef{PYG@tok@kr}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\@namedef{PYG@tok@bp}{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\@namedef{PYG@tok@fm}{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.00,1.00}{##1}}}
|
||||
\@namedef{PYG@tok@vc}{\def\PYG@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
|
||||
\@namedef{PYG@tok@vg}{\def\PYG@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
|
||||
\@namedef{PYG@tok@vi}{\def\PYG@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
|
||||
\@namedef{PYG@tok@vm}{\def\PYG@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
|
||||
\@namedef{PYG@tok@sa}{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
|
||||
\@namedef{PYG@tok@sb}{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
|
||||
\@namedef{PYG@tok@sc}{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
|
||||
\@namedef{PYG@tok@dl}{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
|
||||
\@namedef{PYG@tok@s2}{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
|
||||
\@namedef{PYG@tok@sh}{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
|
||||
\@namedef{PYG@tok@s1}{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
|
||||
\@namedef{PYG@tok@mb}{\def\PYG@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
|
||||
\@namedef{PYG@tok@mf}{\def\PYG@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
|
||||
\@namedef{PYG@tok@mh}{\def\PYG@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
|
||||
\@namedef{PYG@tok@mi}{\def\PYG@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
|
||||
\@namedef{PYG@tok@il}{\def\PYG@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
|
||||
\@namedef{PYG@tok@mo}{\def\PYG@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
|
||||
\@namedef{PYG@tok@ch}{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.24,0.48,0.48}{##1}}}
|
||||
\@namedef{PYG@tok@cm}{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.24,0.48,0.48}{##1}}}
|
||||
\@namedef{PYG@tok@cpf}{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.24,0.48,0.48}{##1}}}
|
||||
\@namedef{PYG@tok@c1}{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.24,0.48,0.48}{##1}}}
|
||||
\@namedef{PYG@tok@cs}{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.24,0.48,0.48}{##1}}}
|
||||
|
||||
\def\PYGZbs{\char`\\}
|
||||
\def\PYGZus{\char`\_}
|
||||
\def\PYGZob{\char`\{}
|
||||
\def\PYGZcb{\char`\}}
|
||||
\def\PYGZca{\char`\^}
|
||||
\def\PYGZam{\char`\&}
|
||||
\def\PYGZlt{\char`\<}
|
||||
\def\PYGZgt{\char`\>}
|
||||
\def\PYGZsh{\char`\#}
|
||||
\def\PYGZpc{\char`\%}
|
||||
\def\PYGZdl{\char`\$}
|
||||
\def\PYGZhy{\char`\-}
|
||||
\def\PYGZsq{\char`\'}
|
||||
\def\PYGZdq{\char`\"}
|
||||
\def\PYGZti{\char`\~}
|
||||
% for compatibility with earlier versions
|
||||
\def\PYGZat{@}
|
||||
\def\PYGZlb{[}
|
||||
\def\PYGZrb{]}
|
||||
\makeatother
|
||||
|
Reference in New Issue
Block a user