From 905f38fc97f0f2bbf5f062cea9fa7770fc1c8aa6 Mon Sep 17 00:00:00 2001 From: NickFowler Date: Sat, 1 Feb 2020 13:06:12 +1100 Subject: [PATCH 1/4] Added LeanTween --- GGJ2020/Assets/LeanTween.meta | 2 + GGJ2020/Assets/LeanTween/Documentation.meta | 2 + .../LeanTween/Documentation/assets.meta | 2 + .../LeanTween/Documentation/assets/css.meta | 2 + .../Documentation/assets/css/main.css | 836 ++ .../Documentation/assets/css/main.css.meta | 2 + .../Documentation/assets/favicon.ico | Bin 0 -> 5430 bytes .../Documentation/assets/favicon.ico.meta | 8 + .../LeanTween/Documentation/assets/index.html | 10 + .../Documentation/assets/index.html.meta | 2 + .../LeanTween/Documentation/classes.meta | 2 + .../Documentation/classes/LTBezierPath.html | 721 ++ .../classes/LTBezierPath.html.meta | 2 + .../Documentation/classes/LTDescr.html | 2940 +++++++ .../Documentation/classes/LTDescr.html.meta | 2 + .../Documentation/classes/LTEvent.html | 238 + .../Documentation/classes/LTEvent.html.meta | 2 + .../Documentation/classes/LTRect.html | 360 + .../Documentation/classes/LTRect.html.meta | 2 + .../Documentation/classes/LTSeq.html | 535 ++ .../Documentation/classes/LTSeq.html.meta | 8 + .../Documentation/classes/LTSpline.html | 797 ++ .../Documentation/classes/LTSpline.html.meta | 2 + .../Documentation/classes/LeanAudio.html | 333 + .../Documentation/classes/LeanAudio.html.meta | 2 + .../classes/LeanAudioOptions.html | 384 + .../classes/LeanAudioOptions.html.meta | 2 + .../Documentation/classes/LeanTween.html | 7523 +++++++++++++++++ .../Documentation/classes/LeanTween.html.meta | 2 + .../Documentation/classes/LeanTweenType.html | 1091 +++ .../classes/LeanTweenType.html.meta | 2 + .../Documentation/classes/index.html | 10 + .../Documentation/classes/index.html.meta | 2 + .../LeanTween/Documentation/elements.meta | 9 + .../Documentation/elements/index.html | 10 + .../Documentation/elements/index.html.meta | 8 + .../Assets/LeanTween/Documentation/index.html | 166 + .../LeanTween/Documentation/index.html.meta | 2 + GGJ2020/Assets/LeanTween/Editor.meta | 9 + .../Editor/LeanTweenDocumentationEditor.cs | 59 + .../LeanTweenDocumentationEditor.cs.meta | 7 + GGJ2020/Assets/LeanTween/License.txt | 31 + GGJ2020/Assets/LeanTween/License.txt.meta | 8 + GGJ2020/Assets/LeanTween/ReadMe.txt | 9 + GGJ2020/Assets/LeanTween/ReadMe.txt.meta | 2 + GGJ2020/Assets/Plugins.meta | 2 + GGJ2020/Assets/Plugins/LeanTween.meta | 9 + GGJ2020/Assets/Plugins/LeanTween/LTDescr.cs | 2285 +++++ .../Assets/Plugins/LeanTween/LTDescr.cs.meta | 12 + .../Plugins/LeanTween/LTDescrOptional.cs | 88 + .../Plugins/LeanTween/LTDescrOptional.cs.meta | 12 + GGJ2020/Assets/Plugins/LeanTween/LTSeq.cs | 227 + .../Assets/Plugins/LeanTween/LTSeq.cs.meta | 12 + GGJ2020/Assets/Plugins/LeanTween/LeanAudio.cs | 418 + .../Plugins/LeanTween/LeanAudio.cs.meta | 12 + GGJ2020/Assets/Plugins/LeanTween/LeanTest.cs | 123 + .../Assets/Plugins/LeanTween/LeanTest.cs.meta | 12 + GGJ2020/Assets/Plugins/LeanTween/LeanTween.cs | 3709 ++++++++ .../Plugins/LeanTween/LeanTween.cs.meta | 12 + .../Plugins/LeanTween/LeanTween.dll.zip | 3 + .../Plugins/LeanTween/LeanTween.dll.zip.meta | 8 + GGJ2020/Assets/Scripts/PlayerController.cs | 56 +- 62 files changed, 23140 insertions(+), 8 deletions(-) create mode 100644 GGJ2020/Assets/LeanTween.meta create mode 100644 GGJ2020/Assets/LeanTween/Documentation.meta create mode 100644 GGJ2020/Assets/LeanTween/Documentation/assets.meta create mode 100644 GGJ2020/Assets/LeanTween/Documentation/assets/css.meta create mode 100644 GGJ2020/Assets/LeanTween/Documentation/assets/css/main.css create mode 100644 GGJ2020/Assets/LeanTween/Documentation/assets/css/main.css.meta create mode 100644 GGJ2020/Assets/LeanTween/Documentation/assets/favicon.ico create mode 100644 GGJ2020/Assets/LeanTween/Documentation/assets/favicon.ico.meta create mode 100644 GGJ2020/Assets/LeanTween/Documentation/assets/index.html create mode 100644 GGJ2020/Assets/LeanTween/Documentation/assets/index.html.meta create mode 100644 GGJ2020/Assets/LeanTween/Documentation/classes.meta create mode 100644 GGJ2020/Assets/LeanTween/Documentation/classes/LTBezierPath.html create mode 100644 GGJ2020/Assets/LeanTween/Documentation/classes/LTBezierPath.html.meta create mode 100644 GGJ2020/Assets/LeanTween/Documentation/classes/LTDescr.html create mode 100644 GGJ2020/Assets/LeanTween/Documentation/classes/LTDescr.html.meta create mode 100644 GGJ2020/Assets/LeanTween/Documentation/classes/LTEvent.html create mode 100644 GGJ2020/Assets/LeanTween/Documentation/classes/LTEvent.html.meta create mode 100644 GGJ2020/Assets/LeanTween/Documentation/classes/LTRect.html create mode 100644 GGJ2020/Assets/LeanTween/Documentation/classes/LTRect.html.meta create mode 100644 GGJ2020/Assets/LeanTween/Documentation/classes/LTSeq.html create mode 100644 GGJ2020/Assets/LeanTween/Documentation/classes/LTSeq.html.meta create mode 100644 GGJ2020/Assets/LeanTween/Documentation/classes/LTSpline.html create mode 100644 GGJ2020/Assets/LeanTween/Documentation/classes/LTSpline.html.meta create mode 100644 GGJ2020/Assets/LeanTween/Documentation/classes/LeanAudio.html create mode 100644 GGJ2020/Assets/LeanTween/Documentation/classes/LeanAudio.html.meta create mode 100644 GGJ2020/Assets/LeanTween/Documentation/classes/LeanAudioOptions.html create mode 100644 GGJ2020/Assets/LeanTween/Documentation/classes/LeanAudioOptions.html.meta create mode 100644 GGJ2020/Assets/LeanTween/Documentation/classes/LeanTween.html create mode 100644 GGJ2020/Assets/LeanTween/Documentation/classes/LeanTween.html.meta create mode 100644 GGJ2020/Assets/LeanTween/Documentation/classes/LeanTweenType.html create mode 100644 GGJ2020/Assets/LeanTween/Documentation/classes/LeanTweenType.html.meta create mode 100644 GGJ2020/Assets/LeanTween/Documentation/classes/index.html create mode 100644 GGJ2020/Assets/LeanTween/Documentation/classes/index.html.meta create mode 100644 GGJ2020/Assets/LeanTween/Documentation/elements.meta create mode 100644 GGJ2020/Assets/LeanTween/Documentation/elements/index.html create mode 100644 GGJ2020/Assets/LeanTween/Documentation/elements/index.html.meta create mode 100644 GGJ2020/Assets/LeanTween/Documentation/index.html create mode 100644 GGJ2020/Assets/LeanTween/Documentation/index.html.meta create mode 100644 GGJ2020/Assets/LeanTween/Editor.meta create mode 100644 GGJ2020/Assets/LeanTween/Editor/LeanTweenDocumentationEditor.cs create mode 100644 GGJ2020/Assets/LeanTween/Editor/LeanTweenDocumentationEditor.cs.meta create mode 100644 GGJ2020/Assets/LeanTween/License.txt create mode 100644 GGJ2020/Assets/LeanTween/License.txt.meta create mode 100644 GGJ2020/Assets/LeanTween/ReadMe.txt create mode 100644 GGJ2020/Assets/LeanTween/ReadMe.txt.meta create mode 100644 GGJ2020/Assets/Plugins.meta create mode 100644 GGJ2020/Assets/Plugins/LeanTween.meta create mode 100644 GGJ2020/Assets/Plugins/LeanTween/LTDescr.cs create mode 100644 GGJ2020/Assets/Plugins/LeanTween/LTDescr.cs.meta create mode 100644 GGJ2020/Assets/Plugins/LeanTween/LTDescrOptional.cs create mode 100644 GGJ2020/Assets/Plugins/LeanTween/LTDescrOptional.cs.meta create mode 100644 GGJ2020/Assets/Plugins/LeanTween/LTSeq.cs create mode 100644 GGJ2020/Assets/Plugins/LeanTween/LTSeq.cs.meta create mode 100644 GGJ2020/Assets/Plugins/LeanTween/LeanAudio.cs create mode 100644 GGJ2020/Assets/Plugins/LeanTween/LeanAudio.cs.meta create mode 100644 GGJ2020/Assets/Plugins/LeanTween/LeanTest.cs create mode 100644 GGJ2020/Assets/Plugins/LeanTween/LeanTest.cs.meta create mode 100644 GGJ2020/Assets/Plugins/LeanTween/LeanTween.cs create mode 100644 GGJ2020/Assets/Plugins/LeanTween/LeanTween.cs.meta create mode 100644 GGJ2020/Assets/Plugins/LeanTween/LeanTween.dll.zip create mode 100644 GGJ2020/Assets/Plugins/LeanTween/LeanTween.dll.zip.meta diff --git a/GGJ2020/Assets/LeanTween.meta b/GGJ2020/Assets/LeanTween.meta new file mode 100644 index 0000000..0bc313d --- /dev/null +++ b/GGJ2020/Assets/LeanTween.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 5e6a0fa47acf54892bbdae89028eaec3 diff --git a/GGJ2020/Assets/LeanTween/Documentation.meta b/GGJ2020/Assets/LeanTween/Documentation.meta new file mode 100644 index 0000000..69aee15 --- /dev/null +++ b/GGJ2020/Assets/LeanTween/Documentation.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 6737b2aaab0f546e39693df5f551dfc8 diff --git a/GGJ2020/Assets/LeanTween/Documentation/assets.meta b/GGJ2020/Assets/LeanTween/Documentation/assets.meta new file mode 100644 index 0000000..ed25ad6 --- /dev/null +++ b/GGJ2020/Assets/LeanTween/Documentation/assets.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: cb26df1b849af495bbce0f91bac5a3f7 diff --git a/GGJ2020/Assets/LeanTween/Documentation/assets/css.meta b/GGJ2020/Assets/LeanTween/Documentation/assets/css.meta new file mode 100644 index 0000000..03b114e --- /dev/null +++ b/GGJ2020/Assets/LeanTween/Documentation/assets/css.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 1f4f05e2c3c7b4c5eb028eb9c0c93886 diff --git a/GGJ2020/Assets/LeanTween/Documentation/assets/css/main.css b/GGJ2020/Assets/LeanTween/Documentation/assets/css/main.css new file mode 100644 index 0000000..621cf57 --- /dev/null +++ b/GGJ2020/Assets/LeanTween/Documentation/assets/css/main.css @@ -0,0 +1,836 @@ +/* +Font sizes for all selectors other than the body are given in percentages, +with 100% equal to 13px. To calculate a font size percentage, multiply the +desired size in pixels by 7.6923076923. + +Here's a quick lookup table: + +10px - 76.923% +11px - 84.615% +12px - 92.308% +13px - 100% +14px - 107.692% +15px - 115.385% +16px - 123.077% +17px - 130.769% +18px - 138.462% +19px - 146.154% +20px - 153.846% +*/ + + +html { + background: #fff; + color: #333; + overflow-y: scroll; +} + +body { + font: 13px/1.4 'Lucida Grande', 'Lucida Sans Unicode', 'DejaVu Sans', 'Bitstream Vera Sans', 'Helvetica', 'Arial', sans-serif; + margin: 0; + padding: 0; +} + +/* -- Links ----------------------------------------------------------------- */ +a { + color: #356de4; + text-decoration: none; +} + +.hidden { + display: none; +} + +a:hover { text-decoration: underline; } + +/* "Jump to Table of Contents" link is shown to assistive tools, but hidden from + sight until it's focused. */ +.jump { + position: absolute; + padding: 3px 6px; + left: -99999px; + top: 0; +} + +.jump:focus { left: 40%; } + +/* -- Paragraphs ------------------------------------------------------------ */ +p { margin: 1.3em 0; } +dd p, td p { margin-bottom: 0; } +dd p:first-child, td p:first-child { margin-top: 0; } + +/* -- Headings -------------------------------------------------------------- */ +h1, h2, h3, h4, h5, h6 { + color: #D98527;/*was #f80*/ + font-family: 'Trebuchet MS', sans-serif; + font-weight: bold; + line-height: 1.1; + margin: 1.1em 0 0.5em; +} + +h1 { + font-size: 184.6%; + color: #30418C; + margin: 0.75em 0 0.5em; +} + +h2 { + font-size: 153.846%; + color: #E48A2B; +} + +h3 { font-size: 138.462%; } + +h4 { + border-bottom: 1px solid #DBDFEA; + color: #E48A2B; + font-size: 115.385%; + font-weight: normal; + padding-bottom: 2px; +} + +h5, h6 { font-size: 107.692%; } + +/* -- Code and examples ----------------------------------------------------- */ +code, kbd, pre, samp { + font-family: Menlo, Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; + font-size: 92.308%; + line-height: 1.35; +} + +p code, p kbd, p samp { + background: #FCFBFA; + border: 1px solid #EFEEED; + padding: 0 3px; +} + +a code, a kbd, a samp, +pre code, pre kbd, pre samp, +table code, table kbd, table samp, +.intro code, .intro kbd, .intro samp, +.toc code, .toc kbd, .toc samp { + background: none; + border: none; + padding: 0; +} + +pre.code, pre.terminal, pre.cmd { + overflow-x: auto; + *overflow-x: scroll; + padding: 0.3em 0.6em; +} + +pre.code { + background: #FCFBFA; + border: 1px solid #EFEEED; + border-left-width: 5px; +} + +pre.terminal, pre.cmd { + background: #F0EFFC; + border: 1px solid #D0CBFB; + border-left: 5px solid #D0CBFB; +} + +/* Don't reduce the font size of // elements inside
+   blocks. */
+pre code, pre kbd, pre samp { font-size: 100%; }
+
+/* Used to denote text that shouldn't be selectable, such as line numbers or
+   shell prompts. Guess which browser this doesn't work in. */
+.noselect {
+    -moz-user-select: -moz-none;
+    -khtml-user-select: none;
+    -webkit-user-select: none;
+    -o-user-select: none;
+    user-select: none;
+}
+
+/* -- Lists ----------------------------------------------------------------- */
+dd { margin: 0.2em 0 0.7em 1em; }
+dl { margin: 1em 0; }
+dt { font-weight: bold; }
+
+/* -- Tables ---------------------------------------------------------------- */
+caption, th { text-align: left; }
+
+table {
+    border-collapse: collapse;
+    width: 100%;
+}
+
+td, th {
+    border: 1px solid #fff;
+    padding: 5px 12px;
+    vertical-align: top;
+}
+
+td { background: #E6E9F5; }
+td dl { margin: 0; }
+td dl dl { margin: 1em 0; }
+td pre:first-child { margin-top: 0; }
+
+th {
+    background: #D2D7E6;/*#97A0BF*/
+    border-bottom: none;
+    border-top: none;
+    color: #000;/*#FFF1D5*/
+    font-family: 'Trebuchet MS', sans-serif;
+    font-weight: bold;
+    line-height: 1.3;
+    white-space: nowrap;
+}
+
+
+/* -- Layout and Content ---------------------------------------------------- */
+#doc {
+    margin: auto;
+    min-width: 1024px;
+}
+
+.content { padding: 0 20px 0 25px; }
+
+.sidebar {
+    padding: 0 15px 0 10px;
+}
+#bd {
+    padding: 7px 0 130px;
+    position: relative;
+    width: 99%;
+}
+
+/* -- Table of Contents ----------------------------------------------------- */
+
+/* The #toc id refers to the single global table of contents, while the .toc
+   class refers to generic TOC lists that could be used throughout the page. */
+
+.toc code, .toc kbd, .toc samp { font-size: 100%; }
+.toc li { font-weight: bold; }
+.toc li li { font-weight: normal; }
+
+/* -- Intro and Example Boxes ----------------------------------------------- */
+
+.intro, .example { margin-bottom: 2em; }
+.example {
+    -moz-border-radius: 4px;
+    -webkit-border-radius: 4px;
+    border-radius: 4px;
+    -moz-box-shadow: 0 0 5px #bfbfbf;
+    -webkit-box-shadow: 0 0 5px #bfbfbf;
+    box-shadow: 0 0 5px #bfbfbf;
+    padding: 0.5em 0.5em 0.5em 0.5em;
+    background-color: #EFF2FA;
+}
+.intro {
+    background: none repeat scroll 0 0 #F0F1F8; border: 1px solid #D4D8EB; padding: 0 1em;
+}
+
+.example h4{
+    margin:0.0em 0 0.0em;
+}
+
+.example p {
+    margin:0.3em 0;
+}
+
+
+/* -- Other Styles ---------------------------------------------------------- */
+
+/* These are probably YUI-specific, and should be moved out of Selleck's default
+   theme. */
+
+.button {
+    border: 1px solid #dadada;
+    -moz-border-radius: 3px;
+    -webkit-border-radius: 3px;
+    border-radius: 3px;
+    color: #444;
+    display: inline-block;
+    font-family: Helvetica, Arial, sans-serif;
+    font-size: 92.308%;
+    font-weight: bold;
+    padding: 4px 13px 3px;
+    -moz-text-shadow: 1px 1px 0 #fff;
+    -webkit-text-shadow: 1px 1px 0 #fff;
+    text-shadow: 1px 1px 0 #fff;
+    white-space: nowrap;
+
+    background: #EFEFEF; /* old browsers */
+    background: -moz-linear-gradient(top, #f5f5f5 0%, #efefef 50%, #e5e5e5 51%, #dfdfdf 100%); /* firefox */
+    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f5f5f5), color-stop(50%,#efefef), color-stop(51%,#e5e5e5), color-stop(100%,#dfdfdf)); /* webkit */
+    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f5f5f5', endColorstr='#dfdfdf',GradientType=0 ); /* ie */
+}
+
+.button:hover {
+    border-color: #466899;
+    color: #fff;
+    text-decoration: none;
+    -moz-text-shadow: 1px 1px 0 #222;
+    -webkit-text-shadow: 1px 1px 0 #222;
+    text-shadow: 1px 1px 0 #222;
+
+    background: #6396D8; /* old browsers */
+    background: -moz-linear-gradient(top, #6396D8 0%, #5A83BC 50%, #547AB7 51%, #466899 100%); /* firefox */
+    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#6396D8), color-stop(50%,#5A83BC), color-stop(51%,#547AB7), color-stop(100%,#466899)); /* webkit */
+    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#6396D8', endColorstr='#466899',GradientType=0 ); /* ie */
+}
+
+.newwindow { text-align: center; }
+
+.header .version em {
+    display: block;
+    text-align: right;
+}
+
+.header .version form {
+    display: block;
+    text-align: right;
+}
+
+
+#classdocs .item {
+    border-bottom: 1px solid #466899;
+    margin: 1em 0;
+    padding: 1.5em;
+}
+
+.params, .returns{
+    font-size:11px;
+}
+
+.returns-description p{
+    margin:0 0 0.6em 0;
+}
+
+#classdocs .item .params p,
+    #classdocs .item .returns p,{
+    display: inline;
+}
+
+#classdocs .item em code, #classdocs .item em.comment {
+    color: green;
+}
+
+#classdocs .item em.comment a {
+    color: green;
+    text-decoration: underline;
+}
+
+#classdocs .foundat {
+    font-size: 11px;
+    font-style: normal;
+}
+
+.attrs .emits {
+    margin-left: 2em;
+    padding: .5em;
+    border-left: 1px dashed #ccc;
+}
+
+abbr {
+    border-bottom: 1px dashed #ccc;
+    font-size: 80%;
+    cursor: help;
+}
+
+.prettyprint li.L0, 
+.prettyprint li.L1, 
+.prettyprint li.L2, 
+.prettyprint li.L3, 
+.prettyprint li.L5, 
+.prettyprint li.L6, 
+.prettyprint li.L7, 
+.prettyprint li.L8 {
+    list-style: decimal;
+}
+
+ul li p {
+    margin-top: 0;
+}
+
+.method .name {
+    font-size: 110%;
+}
+
+.apidocs .methods .extends .method,
+.apidocs .properties .extends .property,
+.apidocs .attrs .extends .attr,
+.apidocs .events .extends .event {
+    font-weight: bold;
+}
+
+.apidocs .methods .extends .inherited,
+.apidocs .properties .extends .inherited,
+.apidocs .attrs .extends .inherited,
+.apidocs .events .extends .inherited {
+    font-weight: normal;
+}
+
+#hd {
+    background: whiteSmoke;
+    background: -moz-linear-gradient(top,#DCDBD9 0,#F6F5F3 100%);
+    background: -webkit-gradient(linear,left top,left bottom,color-stop(0%,#DCDBD9),color-stop(100%,#F6F5F3));
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#dcdbd9',endColorstr='#F6F5F3',GradientType=0);
+    border-bottom: 1px solid #DFDFDF;
+    padding: 0 15px 1px 20px;
+    margin-bottom: 15px;
+}
+
+#hd img {
+    margin-right: 10px;
+    vertical-align: middle;
+}
+
+
+/* -- API Docs CSS ---------------------------------------------------------- */
+
+/*
+This file is organized so that more generic styles are nearer the top, and more
+specific styles are nearer the bottom of the file. This allows us to take full
+advantage of the cascade to avoid redundant style rules. Please respect this
+convention when making changes.
+*/
+
+/* -- Generic TabView styles ------------------------------------------------ */
+
+/*
+These styles apply to all API doc tabviews. To change styles only for a
+specific tabview, see the other sections below.
+*/
+
+.yui3-js-enabled .apidocs .tabview {
+    visibility: visible; /* Hide until the TabView finishes rendering. */
+    _visibility: visible;
+}
+
+.apidocs .tabview.yui3-tabview-content { visibility: visible; }
+.apidocs .tabview .yui3-tabview-panel { background: #fff; }
+
+/* -- Generic Content Styles ------------------------------------------------ */
+
+/* Headings */
+h2, h3, h4, h5, h6 {
+    border: none;
+    color: #30418C;
+    font-weight: bold;
+    text-decoration: none;
+}
+
+.link-docs {
+    float: right;
+    font-size: 15px;
+    margin: 4px 4px 6px;
+    padding: 6px 30px 5px;
+}
+
+.apidocs { zoom: 1; }
+
+/* Generic box styles. */
+.apidocs .box {
+    border: 1px solid;
+    border-radius: 3px;
+    margin: 1em 0;
+    padding: 0 1em;
+}
+
+/* A flag is a compact, capsule-like indicator of some kind. It's used to
+   indicate private and protected items, item return types, etc. in an
+   attractive and unobtrusive way. */
+.apidocs .flag {
+    background: #bababa;
+    border-radius: 3px;
+    color: #fff;
+    font-size: 11px;
+    margin: 0 0.5em;
+    padding: 2px 4px 1px;
+}
+
+/* Class/module metadata such as "Uses", "Extends", "Defined in", etc. */
+.apidocs .meta {
+    background: #f9f9f9;
+    border-color: #efefef;
+    color: #555;
+    font-size: 11px;
+    padding: 3px 6px;
+}
+
+.apidocs .meta p { margin: 0; }
+
+/* Deprecation warning. */
+.apidocs .box.deprecated,
+.apidocs .flag.deprecated {
+    background: #fdac9f;
+    border: 1px solid #fd7775;
+}
+
+.apidocs .box.deprecated p { margin: 0.5em 0; }
+.apidocs .flag.deprecated { color: #333; }
+
+/* Module/Class intro description. */
+.apidocs .intro {
+    background: #f0f1f8;
+    border-color: #d4d8eb;
+}
+
+/* Loading spinners. */
+#bd.loading .apidocs,
+#api-list.loading .yui3-tabview-panel {
+    background: #fff url(../img/spinner.gif) no-repeat center 70px;
+    min-height: 150px;
+}
+
+#bd.loading .apidocs .content,
+#api-list.loading .yui3-tabview-panel .apis {
+    display: none;
+}
+
+.apidocs .no-visible-items { color: #666; }
+
+/* Generic inline list. */
+.apidocs ul.inline {
+    display: inline;
+    list-style: none;
+    margin: 0;
+    padding: 0;
+}
+
+.apidocs ul.inline li { display: inline; }
+
+/* Comma-separated list. */
+.apidocs ul.commas li:after { content: ','; }
+.apidocs ul.commas li:last-child:after { content: ''; }
+
+/* Keyboard shortcuts. */
+kbd .cmd { font-family: Monaco, Helvetica; }
+
+/* -- Generic Access Level styles ------------------------------------------- */
+.apidocs .item.protected,
+.apidocs .item.private,
+.apidocs .index-item.protected,
+.apidocs .index-item.deprecated,
+.apidocs .index-item.private {
+    display: none;
+}
+
+.show-deprecated .item.deprecated,
+.show-deprecated .index-item.deprecated,
+.show-protected .item.protected,
+.show-protected .index-item.protected,
+.show-private .item.private,
+.show-private .index-item.private {
+    display: block;
+}
+
+.hide-inherited .item.inherited,
+.hide-inherited .index-item.inherited {
+    display: none;
+}
+
+/* -- Generic Item Index styles --------------------------------------------- */
+.apidocs .index { margin: 1.5em 0 3em; }
+
+.apidocs .index h3 {
+    border-bottom: 1px solid #efefef;
+    color: #333;
+    font-size: 13px;
+    margin: 2em 0 0.6em;
+    padding-bottom: 2px;
+}
+
+.apidocs .index .no-visible-items { margin-top: 2em; }
+
+.apidocs .index-list {
+    border-color: #efefef;
+    font-size: 12px;
+    list-style: none;
+    margin: 0;
+    padding: 0;
+    -moz-column-count: 4;
+    -moz-column-gap: 10px;
+    -moz-column-width: 170px;
+    -ms-column-count: 4;
+    -ms-column-gap: 10px;
+    -ms-column-width: 170px;
+    -o-column-count: 4;
+    -o-column-gap: 10px;
+    -o-column-width: 170px;
+    -webkit-column-count: 4;
+    -webkit-column-gap: 10px;
+    -webkit-column-width: 170px;
+    column-count: 4;
+    column-gap: 10px;
+    column-width: 170px;
+}
+
+.apidocs .no-columns .index-list {
+    -moz-column-count: 1;
+    -ms-column-count: 1;
+    -o-column-count: 1;
+    -webkit-column-count: 1;
+    column-count: 1;
+}
+
+.apidocs .index-item { white-space: nowrap; }
+
+.apidocs .index-item .flag {
+    background: none;
+    border: none;
+    color: #afafaf;
+    display: inline;
+    margin: 0 0 0 0.2em;
+    padding: 0;
+}
+
+/* -- Generic API item styles ----------------------------------------------- */
+.apidocs .args {
+    display: inline;
+    margin: 0 0.5em;
+}
+
+.apidocs .flag.chainable { background: #46ca3b; }
+.apidocs .flag.protected { background: #9b86fc; }
+.apidocs .flag.private { background: #fd6b1b; }
+.apidocs .flag.async { background: #356de4; }
+.apidocs .flag.required { background: #e60923; }
+
+.apidocs .item {
+    border-bottom: 1px solid #efefef;
+    margin: 1.5em 0 2em;
+    padding-bottom: 2em;
+}
+
+.apidocs .item h4,
+.apidocs .item h5,
+.apidocs .item h6 {
+    color: #333;
+    font-family: inherit;
+    font-size: 100%;
+}
+
+.apidocs .item .description p,
+.apidocs .item pre.code {
+    margin: 1em 0 0;
+}
+
+.apidocs .item .meta {
+    background: none;
+    border: none;
+    padding: 0;
+}
+
+.apidocs .item .name {
+    display: inline;
+    font-size: 14px;
+}
+
+.apidocs .item .type,
+.apidocs .item .type a,
+.apidocs .returns-inline {
+    color: #555;
+}
+
+.apidocs .item .type,
+.apidocs .returns-inline {
+    font-size: 11px;
+    margin: 0 0 0 0;
+}
+
+.apidocs .item .type a { border-bottom: 1px dotted #afafaf; }
+.apidocs .item .type a:hover { border: none; }
+
+/* -- Item Parameter List --------------------------------------------------- */
+.apidocs .params-list {
+    list-style: square;
+    margin: 0 0 0 2em;
+    padding: 0;
+}
+
+.apidocs .param { margin-bottom: 0em; }
+
+.apidocs .param .type,
+.apidocs .param .type a {
+    color: #666;
+}
+
+.apidocs .param .type {
+    margin: 0 0 0 0.5em;
+    *margin-left: 0.5em;
+}
+
+.apidocs .param-name { font-weight: bold; }
+
+/* -- Item "Emits" block ---------------------------------------------------- */
+.apidocs .item .emits {
+    background: #f9f9f9;
+    border-color: #eaeaea;
+}
+
+/* -- Item "Returns" block -------------------------------------------------- */
+.apidocs .item .returns .type,
+.apidocs .item .returns .type a {
+    font-size: 100%;
+    margin: 0;
+}
+
+/* -- Class Constructor block ----------------------------------------------- */
+.apidocs .constructor .item {
+    border: none;
+    padding-bottom: 0;
+}
+
+/* -- File Source View ------------------------------------------------------ */
+.apidocs .file pre.code,
+#doc .apidocs .file pre.prettyprint {
+    background: inherit;
+    border: none;
+    overflow: visible;
+    padding: 0;
+}
+
+.apidocs .L0,
+.apidocs .L1,
+.apidocs .L2,
+.apidocs .L3,
+.apidocs .L4,
+.apidocs .L5,
+.apidocs .L6,
+.apidocs .L7,
+.apidocs .L8,
+.apidocs .L9 {
+    background: inherit;
+}
+
+/* -- Submodule List -------------------------------------------------------- */
+.apidocs .module-submodule-description {
+    font-size: 12px;
+    margin: 0.3em 0 1em;
+}
+
+.apidocs .module-submodule-description p:first-child { margin-top: 0; }
+
+/* -- Sidebar TabView ------------------------------------------------------- */
+#api-tabview { margin-top: 0.6em; }
+
+#api-tabview-filter,
+#api-tabview-panel {
+    border: 1px solid #dfdfdf;
+}
+
+#api-tabview-filter {
+    border-bottom: none;
+    border-top: none;
+    padding: 0.6em 10px 0 10px;
+}
+
+#api-tabview-panel { border-top: none; }
+#api-filter { width: 97%; }
+
+.yui3-u-1-4{
+    width:21%;
+}
+
+/* -- Content TabView ------------------------------------------------------- */
+#classdocs .yui3-tabview-panel { border: none; }
+
+/* -- Source File Contents -------------------------------------------------- */
+.prettyprint li.L0,
+.prettyprint li.L1,
+.prettyprint li.L2,
+.prettyprint li.L3,
+.prettyprint li.L5,
+.prettyprint li.L6,
+.prettyprint li.L7,
+.prettyprint li.L8 {
+    list-style: decimal;
+}
+
+/* -- API options ----------------------------------------------------------- */
+#api-options {
+    font-size: 11px;
+    margin-top: 2.2em;
+    position: absolute;
+    right: 1.5em;
+}
+
+/*#api-options label { margin-right: 0.6em; }*/
+
+/* -- API list -------------------------------------------------------------- */
+#api-list {
+    margin-top: 1.5em;
+    *zoom: 1;
+}
+
+.apis {
+    font-size: 12px;
+    line-height: 1.4;
+    list-style: none;
+    margin: 0;
+    padding: 0.5em 0 0.5em 0.4em;
+}
+
+.apis a {
+    border: 1px solid transparent;
+    display: block;
+    margin: 0 0 0 -4px;
+    padding: 1px 4px 0;
+    text-decoration: none;
+    _border: none;
+    _display: inline;
+}
+
+.apis a:hover,
+.apis a:focus {
+    background: #E8EDFC;
+    background: -moz-linear-gradient(top, #e8edfc 0%, #becef7 100%);
+    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#E8EDFC), color-stop(100%,#BECEF7));
+    border-color: #AAC0FA;
+    border-radius: 3px;
+    color: #333;
+    outline: none;
+}
+
+.api-list-item a:hover,
+.api-list-item a:focus {
+    font-weight: bold;
+    text-shadow: 1px 1px 1px #fff;
+}
+
+.apis .message { color: #888; }
+.apis .result a { padding: 3px 5px 2px; }
+
+.apis .result .type {
+    right: 4px;
+    top: 7px;
+}
+
+.api-list-item .yui3-highlight {
+    font-weight: bold;
+}
+
+#advertising{
+    text-align: center;
+    background-color: #e4e9f6;
+    padding: 5px 0 5px 0;
+}
+
+#advertising img{
+    border:1px solid black;
+}
+
+#advertising *{
+    line-height:1.0;
+    display: block;
+    margin: 5px auto 5px auto;
+    margin-right: auto;
+}
+
+#support{
+    margin-top:8px;
+}
+
+#support td{
+    background:none;
+    border:none;
+    padding:0px;
+}
+
diff --git a/GGJ2020/Assets/LeanTween/Documentation/assets/css/main.css.meta b/GGJ2020/Assets/LeanTween/Documentation/assets/css/main.css.meta
new file mode 100644
index 0000000..850eeeb
--- /dev/null
+++ b/GGJ2020/Assets/LeanTween/Documentation/assets/css/main.css.meta
@@ -0,0 +1,2 @@
+fileFormatVersion: 2
+guid: f2e6f2786cebb4eb8945b46000f02d18
diff --git a/GGJ2020/Assets/LeanTween/Documentation/assets/favicon.ico b/GGJ2020/Assets/LeanTween/Documentation/assets/favicon.ico
new file mode 100644
index 0000000000000000000000000000000000000000..414ac4fb9e145171ae8f660e51879e18c401e653
GIT binary patch
literal 5430
zcmdT|c~n&A6@SF^c=}JZwQU+rgHaP#WKr3f0cL=KVVglvkVQZiQDfDk(FA2t0)iWh
zY=W#JA~S%vRZzjDF`C4MRAU4c7u+h2MgbA{^?q-_;)qB%w&!%tx#zw2&G&uxzWd$#
zyTAK5PK$ew8$O()>u4_YeUAH#Wt}S-?OOYwFzy>RQteQ9yKUN)d(VW}sS?gZ?
zPx|>Q!Vau3)9EakCq-qL90hZ1ks>ulgswI!)`q9{n*WN=S|2z6sbrBy(?+QgBE*JB
zlnJnZksB2AoRK}#3JJogNS28kUOaCb+SeXkot@mC@Q@R^-quL*5MiyIF?RYpVBbPF
z?DVronzI>VjK-tk)Cp_N^|bcAW9b_=#|x%(<@s2lFu)#3Gp(_~*#hPBT~HA!L*8sL
z5-cX6B63B6=K7xxlrGM9x4v^V+X
z@!h76dhelXtk*db8Fs$J#|HUcwzQ80?IA{iKik6!8Kj%}a)*xu8-j)QTIwf8F}-ijENc|feZIeh-y_r024x{G$d+3m-A#1A#mc4rKV*4JZ^cW^A4gm2x16n1`1ZBt
zO=A=*TCJ+)5vp5_WA9%1Y4U@{YvUl~xHfH$Q*}!uT_cBaTn!1wWT;vqhtL>_N{i-`
zfQE5hjWeU^-jamj5&vVrqw#x_P5&?BEJq*RzBTINkt&-zmoH8FU)Zf`y7|$CeM+xA
z(W}x^+#S9n9DFkWk3*qYvohtsrN85O+mNd#4m%%+URIj!DtH`gG9FO|pJ4UW(O5P4
zV=U1gfmAQ~(RZ!C<9X}QhQpQqhr&a@FPv?KZLX$BC)`V-oY`Qlj~LU*h?w>%R!kU$
zNMoJ*&mJ`of0s5qz27vdJlL^Q8R!6IkPDAj+X?^DoJ_IBb_Ui9bg|ZGBEogYVAR!$g+%(=6w-i7}9
zGv5f)!~Cij>W#&6W2#YMu2gemybnsLeinM$A#0{3QXNgO*=9Q81XB??Z5*PFr>LIX
zzxU_C+R*w~HLNN*HaX7TxO0uAF21swh9$;2*fv{4wOdX;U^d8j9+BrM=D9?2cPxHw
zHko|zAhEZ8A5t0fRZ5n-33diaUb7+6
z#t55SEV}ipZBPWMV=B4GlH#pvl{v2#gq*{{)09Pl?4tC#GInl=Ur)_N!k6r*Tf
z-!^1Z{_k6;)?X1SM@fJq)UimI;9yMos7v{v`|RP3>)Hdcp{uiltBw!PPb3bMOuRP1
z+JLTx*cC!tXPzDJhb%rGM2IK;$YQcMK&tiwVG@rCzQoTc78y1t+8H96-lKL~@~XG$
zC;oq7cg~l&Zsy1(PRRIXs*@Qu*~~zO+!Q6DcGwYUhdhdh9vkAE%(33l9Lf-9-Ub$n
zrNl)UFV7+#wpD6E+*${zGi|T5x3=`jt$XYuo;t2P)VW1TamD<|aE0YmhN}e&iIc<$cAAl>WBF
z$z7occH!}rohRdzDN>NU5uhb{jD;6&f{QH}9YL4GIf68+I(%Fs506Vfl#`}WRT;>br*K7|<
z6b0C*^P;y6j%G-u9*yA=j|nUm2@|$bKCvF`+L>?6HFdq|`IkF4v}t%b
zH#c0;xmcFBvNm?v(TW8#n|F9wBU@&QH2UU}BAJfOw$l+$H969H8dh59VYN`7xatI4
z*sJgvkPga)fzEsO;O>V_XHSXilm*Lcw?yStd=Y%2FhF)K)6H77MPm3omN;rS^$N@M
z#vn?d_vB{XIsJj|J=l5etLlh1W?`
c9H-qz(m`J;Xu?oLlCTZhNI;9}q1!h68y;F)#sB~S

literal 0
HcmV?d00001

diff --git a/GGJ2020/Assets/LeanTween/Documentation/assets/favicon.ico.meta b/GGJ2020/Assets/LeanTween/Documentation/assets/favicon.ico.meta
new file mode 100644
index 0000000..c1be27b
--- /dev/null
+++ b/GGJ2020/Assets/LeanTween/Documentation/assets/favicon.ico.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 751c9ec47ccc246ae9845f7503545585
+timeCreated: 1479470953
+licenseType: Store
+DefaultImporter:
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 
diff --git a/GGJ2020/Assets/LeanTween/Documentation/assets/index.html b/GGJ2020/Assets/LeanTween/Documentation/assets/index.html
new file mode 100644
index 0000000..487fe15
--- /dev/null
+++ b/GGJ2020/Assets/LeanTween/Documentation/assets/index.html
@@ -0,0 +1,10 @@
+
+
+    
+        Redirector
+        
+    
+    
+        Click here to redirect
+    
+
diff --git a/GGJ2020/Assets/LeanTween/Documentation/assets/index.html.meta b/GGJ2020/Assets/LeanTween/Documentation/assets/index.html.meta
new file mode 100644
index 0000000..b08ed0a
--- /dev/null
+++ b/GGJ2020/Assets/LeanTween/Documentation/assets/index.html.meta
@@ -0,0 +1,2 @@
+fileFormatVersion: 2
+guid: 395ceea41819e494b8fe14c2e7b05a00
diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes.meta b/GGJ2020/Assets/LeanTween/Documentation/classes.meta
new file mode 100644
index 0000000..c3e4637
--- /dev/null
+++ b/GGJ2020/Assets/LeanTween/Documentation/classes.meta
@@ -0,0 +1,2 @@
+fileFormatVersion: 2
+guid: d4bb1e3d3bec8431a82cb033f38b4ceb
diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LTBezierPath.html b/GGJ2020/Assets/LeanTween/Documentation/classes/LTBezierPath.html
new file mode 100644
index 0000000..0d326a9
--- /dev/null
+++ b/GGJ2020/Assets/LeanTween/Documentation/classes/LTBezierPath.html
@@ -0,0 +1,721 @@
+
+
+
+    
+    LTBezierPath
+    
+    
+    
+    
+    
+    
+    
+    
+
+
+
+
+
+
+

- Developed by Dented Pixel
+
+
+ API Docs for: LeanTween 2.46
+ + + + + +
+

Support LeanTween!

+ +
+
+ + + + + + + +
+
+
+ +

Maintaining and adding new features takes time, your support is appreciated.

+
+
+ + +
+
+ Show: + + + + + + + +
+ +
+
+
+

LTBezierPath Class

+
+ + +
+ Defined in: LeanTween.cs:2592 +
+ + +
+ + +
+

Manually animate along a bezier path with this class

+ +
+ +
+

Constructor

+
+

LTBezierPath

+ +
+ (
    +
  • + pts +
  • +
) +
+ + + + + + + + +
+

+ Defined in + LeanTween.cs:2592 +

+ + + +
+ +
+ +
+ +
+

Parameters:

+ +
    +
  • + pts + Vector3 Array + + +
    +

    A set of points that define one or many bezier paths (the paths should be passed in multiples of 4, which correspond to each individual bezier curve)
    + It goes in the order: startPoint,endControl,startControl,endPoint - Note: the control for the end and start are reversed! This is just a quirk of the API.
    +

    + +
    + +
  • +
+
+ + +
+

Example:

+ +
+

LTBezierPath ltPath = new LTBezierPath( new Vector3[] { new Vector3(0f,0f,0f),new Vector3(1f,0f,0f), new Vector3(1f,0f,0f), new Vector3(1f,1f,0f)} );

+ LeanTween.move(lt, ltPath.vec3, 4.0f).setOrientToPath(true).setDelay(1f).setEase(LeanTweenType.easeInOutQuad); // animate
+ Vector3 pt = ltPath.point( 0.6f ); // retrieve a point along the path

+ +
+
+
+
+ +
+ + +
+
+

Item Index

+ +
+

Methods

+ + +
+ +
+

Properties

+ + +
+ + +
+ +
+

Methods

+ +
+

place

+ +
+ (
    +
  • + transform:Transform +
  • +
  • + ratio:float +
  • +
) +
+ + + + + + + + +
+

+ Defined in + LeanTween.cs:2691 +

+ + + +
+ +
+

Place an object along a certain point on the path (facing the direction perpendicular to the path)

Move a GameObject to a certain location

+ +
+ +
+

Parameters:

+ +
    +
  • + transform:Transform + Transform + + +
    +

    the transform of the object you wish to place along the path

    + +
    + +
  • +
  • + ratio:float + Float + + +
    +

    ratio of the point along the path you wish to receive (0-1)

    + +
    + +
  • +
+
+ + +
+

Example:

+ +
+

ltPath.place( transform, 0.6f );

+ +
+
+
+
+

place

+ +
+ (
    +
  • + transform:Transform +
  • +
  • + ratio:float +
  • +
  • + rotation:Vector3 +
  • +
) +
+ + + + + + + + +
+

+ Defined in + LeanTween.cs:2705 +

+ + + +
+ +
+

Place an object along a certain point on the path, with it facing a certain direction perpendicular to the path

Move a GameObject to a certain location

+ +
+ +
+

Parameters:

+ +
    +
  • + transform:Transform + Transform + + +
    +

    the transform of the object you wish to place along the path

    + +
    + +
  • +
  • + ratio:float + Float + + +
    +

    ratio of the point along the path you wish to receive (0-1)

    + +
    + +
  • +
  • + rotation:Vector3 + Vector3 + + +
    +

    the direction in which to place the transform ex: Vector3.up

    + +
    + +
  • +
+
+ + +
+

Example:

+ +
+

ltPath.place( transform, 0.6f, Vector3.left );

+ +
+
+
+
+

placeLocal

+ +
+ (
    +
  • + transform:Transform +
  • +
  • + ratio:float +
  • +
) +
+ + + + + + + + +
+

+ Defined in + LeanTween.cs:2723 +

+ + + +
+ +
+

Place an object along a certain point on the path (facing the direction perpendicular to the path) - Local Space, not world-space

Move a GameObject to a certain location

+ +
+ +
+

Parameters:

+ +
    +
  • + transform:Transform + Transform + + +
    +

    the transform of the object you wish to place along the path

    + +
    + +
  • +
  • + ratio:float + Float + + +
    +

    ratio of the point along the path you wish to receive (0-1)

    + +
    + +
  • +
+
+ + +
+

Example:

+ +
+

ltPath.placeLocal( transform, 0.6f );

+ +
+
+
+
+

placeLocal

+ +
+ (
    +
  • + transform:Transform +
  • +
  • + ratio:float +
  • +
  • + rotation:Vector3 +
  • +
) +
+ + + + + + + + +
+

+ Defined in + LeanTween.cs:2736 +

+ + + +
+ +
+

Place an object along a certain point on the path, with it facing a certain direction perpendicular to the path - Local Space, not world-space

Move a GameObject to a certain location

+ +
+ +
+

Parameters:

+ +
    +
  • + transform:Transform + Transform + + +
    +

    the transform of the object you wish to place along the path

    + +
    + +
  • +
  • + ratio:float + Float + + +
    +

    ratio of the point along the path you wish to receive (0-1)

    + +
    + +
  • +
  • + rotation:Vector3 + Vector3 + + +
    +

    the direction in which to place the transform ex: Vector3.up

    + +
    + +
  • +
+
+ + +
+

Example:

+ +
+

ltPath.placeLocal( transform, 0.6f, Vector3.left );

+ +
+
+
+
+

point

+ +
+ (
    +
  • + ratio:float +
  • +
) +
+ + + Vector3 + + + + + + + + +
+

+ Defined in + LeanTween.cs:2652 +

+ + + +
+ +
+

Retrieve a point along a path

Move a GameObject to a certain location

+ +
+ +
+

Parameters:

+ +
    +
  • + ratio:float + Float + + +
    +

    ratio of the point along the path you wish to receive (0-1)

    + +
    + +
  • +
+
+ +
+

Returns:

+ +
+ Vector3: +

Vector3 position of the point along the path

+ +
+
+ +
+

Example:

+ +
+

transform.position = ltPath.point( 0.6f );

+ +
+
+
+
+ +
+

Properties

+ +
+

distance distance of the path (in unity units)

+ Float + + + + + +
+

+ Defined in + LeanTween.cs:2643 +

+ + +
+ +
+ +
+ + + +
+
+ + +
+
+
+
+
+
+
+
+ + + + + + + + + + diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LTBezierPath.html.meta b/GGJ2020/Assets/LeanTween/Documentation/classes/LTBezierPath.html.meta new file mode 100644 index 0000000..98d07aa --- /dev/null +++ b/GGJ2020/Assets/LeanTween/Documentation/classes/LTBezierPath.html.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: f7b721e4275c14b53a73241b9d0b256f diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LTDescr.html b/GGJ2020/Assets/LeanTween/Documentation/classes/LTDescr.html new file mode 100644 index 0000000..8bcaef4 --- /dev/null +++ b/GGJ2020/Assets/LeanTween/Documentation/classes/LTDescr.html @@ -0,0 +1,2940 @@ + + + + + LTDescr + + + + + + + + + + + +
+
+
+

- Developed by Dented Pixel
+
+
+ API Docs for: LeanTween 2.46
+ + + + + +
+

Support LeanTween!

+ +
+
+ + + + + + + +
+
+
+ +

Maintaining and adding new features takes time, your support is appreciated.

+
+
+ + +
+
+ Show: + + + + + + + +
+ +
+
+
+

LTDescr Class

+
+ + +
+ Defined in: LTDescr.cs:5 +
+ + +
+ + +
+

Internal Representation of a Tween
+
+ This class represents all of the optional parameters you can pass to a method (it also represents the internal representation of the tween).

+ Optional Parameters are passed at the end of every method:
+
+   Example:
+   LeanTween.moveX( gameObject, 1f, 1f).setEase( LeanTweenType.easeInQuad ).setDelay(1f);
+
+ You can pass the optional parameters in any order, and chain on as many as you wish.
+ You can also pass parameters at a later time by saving a reference to what is returned.
+
+ Retrieve a unique id for the tween by using the "id" property. You can pass this to LeanTween.pause, LeanTween.resume, LeanTween.cancel, LeanTween.isTweening methods
+
+   

Example:

+   int id = LeanTween.moveX(gameObject, 1f, 3f).id;

+
  // pause a specific tween
+   LeanTween.pause(id);
+
  // resume later
+   LeanTween.resume(id);
+
  // check if it is tweening before kicking of a new tween
+   if( LeanTween.isTweening( id ) ){
+       LeanTween.cancel( id );
+       LeanTween.moveZ(gameObject, 10f, 3f);
+   }
+
+ +
+

Constructor

+
+

LTDescr

+ + () + + + + + + + + +
+

+ Defined in + LTDescr.cs:5 +

+ + + +
+ +
+ +
+ + + +
+
+ +
+ + +
+
+

Item Index

+ +
+

Methods

+ + +
+ + + +
+ +
+

Methods

+ +
+

pause

+ + () + + + LTDescr + + + + + + + + +
+

+ Defined in + LTDescr.cs:1160 +

+ + + +
+ +
+

Pause a tween

+ +
+ + +
+

Returns:

+ +
+ LTDescr: +

LTDescr an object that distinguishes the tween

+ +
+
+ +
+
+

resume

+ + () + + + LTDescr + + + + + + + + +
+

+ Defined in + LTDescr.cs:1175 +

+ + + +
+ +
+

Resume a paused tween

+ +
+ + +
+

Returns:

+ +
+ LTDescr: +

LTDescr an object that distinguishes the tween

+ +
+
+ +
+
+

setAxis

+ +
+ (
    +
  • + axis +
  • +
) +
+ + + LTDescr + + + + + + + + +
+

+ Defined in + LTDescr.cs:1187 +

+ + + +
+ +
+

Set Axis optional axis for tweens where it is relevant

+ +
+ +
+

Parameters:

+ +
    +
  • + axis + Vector3 + + +
    +

    either the tween rotates around, or the direction it faces in the case of setOrientToPath

    + +
    + +
  • +
+
+ +
+

Returns:

+ +
+ LTDescr: +

LTDescr an object that distinguishes the tween

+ +
+
+ +
+

Example:

+ +
+

LeanTween.move( ltLogo, path, 1.0f ).setEase(LeanTweenType.easeOutQuad).setOrientToPath(true).setAxis(Vector3.forward);

+ +
+
+
+
+

setDelay

+ +
+ (
    +
  • + float +
  • +
) +
+ + + LTDescr + + + + + + + + +
+

+ Defined in + LTDescr.cs:1201 +

+ + + +
+ +
+

Delay the start of a tween

+ +
+ +
+

Parameters:

+ +
    +
  • + float + Float + + +
    +

    time The time to complete the tween in

    + +
    + +
  • +
+
+ +
+

Returns:

+ +
+ LTDescr: +

LTDescr an object that distinguishes the tween

+ +
+
+ +
+

Example:

+ +
+

LeanTween.moveX(gameObject, 5f, 2.0f ).setDelay( 1.5f );

+ +
+
+
+
+

setDirection

+ +
+ (
    +
  • + direction:float +
  • +
) +
+ + + LTDescr + + + + + + + + +
+

+ Defined in + LTDescr.cs:2236 +

+ + + +
+ +
+

Set the direction of a tween -1f for backwards 1f for forwards (currently only bezier and spline paths are supported)

+ +
+ +
+

Parameters:

+ +
    +
  • + direction:float + Float + + +
    +

    the direction that the tween should run, -1f for backwards 1f for forwards

    + +
    + +
  • +
+
+ +
+

Returns:

+ +
+ LTDescr: +

LTDescr an object that distinguishes the tween

+ +
+
+ +
+

Example:

+ +
+

LeanTween.moveSpline(gameObject, new Vector3[]{new Vector3(0f,0f,0f),new Vector3(1f,0f,0f),new Vector3(1f,0f,0f),new Vector3(1f,0f,1f)}, 1.5f).setDirection(-1f);

+ +
+
+
+
+

setEase

+ +
+ (
    +
  • + easeType:LeanTweenType +
  • +
) +
+ + + LTDescr + + + + + + + + +
+

+ Defined in + LTDescr.cs:1216 +

+ + + +
+ +
+

Set the type of easing used for the tween.

+ +
+ +
+

Parameters:

+ +
    +
  • + easeType:LeanTweenType + LeanTweenType + + +
    +

    the easing type to use

    + +
    + +
  • +
+
+ +
+

Returns:

+ +
+ LTDescr: +

LTDescr an object that distinguishes the tween

+ +
+
+ +
+

Example:

+ +
+

LeanTween.moveX(gameObject, 5f, 2.0f ).setEase( LeanTweenType.easeInBounce );

+ +
+
+
+
+

setEase (AnimationCurve)

+ +
+ (
    +
  • + easeDefinition:AnimationCurve +
  • +
) +
+ + + LTDescr + + + + + + + + +
+

+ Defined in + LTDescr.cs:1666 +

+ + + +
+ +
+

Set the type of easing used for the tween with a custom curve.

+ +
+ +
+

Parameters:

+ +
    +
  • + easeDefinition:AnimationCurve + AnimationCurve + + +
    +

    an AnimationCure that describes the type of easing you want, this is great for when you want a unique type of movement

    + +
    + +
  • +
+
+ +
+

Returns:

+ +
+ LTDescr: +

LTDescr an object that distinguishes the tween

+ +
+
+ +
+

Example:

+ +
+

LeanTween.moveX(gameObject, 5f, 2.0f ).setEase( LeanTweenType.easeInBounce );

+ +
+
+
+
+

setFrom

+ +
+ (
    +
  • + from:Vector3 +
  • +
) +
+ + + LTDescr + + + + + + + + +
+

+ Defined in + LTDescr.cs:1707 +

+ + + +
+ +
+

Set the beginning of the tween

+ +
+ +
+

Parameters:

+ +
    +
  • + from:Vector3 + Vector3 + + +
    +

    the point you would like the tween to start at

    + +
    + +
  • +
+
+ +
+

Returns:

+ +
+ LTDescr: +

LTDescr an object that distinguishes the tween

+ +
+
+ +
+

Example:

+ +
+

LTDescr descr = LeanTween.move( cube, Vector3.up, new Vector3(1f,3f,0f), 1.0f ).setFrom( new Vector3(5f,10f,3f) );

+ +
+
+
+
+

setIgnoreTimeScale

+ +
+ (
    +
  • + useUnScaledTime:bool +
  • +
) +
+ + + LTDescr + + + + + + + + +
+

+ Defined in + LTDescr.cs:1826 +

+ + + +
+ +
+

Set ignore time scale when tweening an object when you want the animation to be time-scale independent (ignores the Time.timeScale value). Great for pause screens, when you want all other action to be stopped (or slowed down)

+ +
+ +
+

Parameters:

+ +
    +
  • + useUnScaledTime:bool + Bool + + +
    +

    whether to use the unscaled time or not

    + +
    + +
  • +
+
+ +
+

Returns:

+ +
+ LTDescr: +

LTDescr an object that distinguishes the tween

+ +
+
+ +
+

Example:

+ +
+

LeanTween.moveX(gameObject, 5f, 2.0f ).setRepeat( 2 ).setIgnoreTimeScale( true );

+ +
+
+
+
+

setLoopClamp

+ +
+ (
    +
  • + loops:int +
  • +
) +
+ + + LTDescr + + + + + + + + +
+

+ Defined in + LTDescr.cs:1875 +

+ + + +
+ +
+

When the animation gets to the end it starts back at where it began

+ +
+ +
+

Parameters:

+ +
    +
  • + loops:int + Int + + +
    +

    (defaults to -1) how many times you want the loop to happen (-1 for an infinite number of times)

    + +
    + +
  • +
+
+ +
+

Returns:

+ +
+ LTDescr: +

LTDescr an object that distinguishes the tween

+ +
+
+ +
+

Example:

+ +
+

LeanTween.moveX(gameObject, 5f, 2.0f ).setLoopClamp( 2 );

+ +
+
+
+
+

setLoopOnce

+ + () + + + LTDescr + + + + + + + + +
+

+ Defined in + LTDescr.cs:1866 +

+ + + +
+ +
+

No looping involved, just run once (the default)

+ +
+ + +
+

Returns:

+ +
+ LTDescr: +

LTDescr an object that distinguishes the tween

+ +
+
+ +
+

Example:

+ +
+

LeanTween.moveX(gameObject, 5f, 2.0f ).setLoopOnce();

+ +
+
+
+
+

setLoopPingPong

+ +
+ (
    +
  • + loops:int +
  • +
) +
+ + + LTDescr + + + + + + + + +
+

+ Defined in + LTDescr.cs:1894 +

+ + + +
+ +
+

When the animation gets to the end it then tweens back to where it started (and on, and on)

+ +
+ +
+

Parameters:

+ +
    +
  • + loops:int + Int + + +
    +

    (defaults to -1) how many times you want the loop to happen in both directions (-1 for an infinite number of times). Passing a value of 1 will cause the object to go towards and back from it's destination once.

    + +
    + +
  • +
+
+ +
+

Returns:

+ +
+ LTDescr: +

LTDescr an object that distinguishes the tween

+ +
+
+ +
+

Example:

+ +
+

LeanTween.moveX(gameObject, 5f, 2.0f ).setLoopPingPong( 2 );

+ +
+
+
+
+

setOnComplete

+ +
+ (
    +
  • + onComplete:Action +
  • +
) +
+ + + LTDescr + + + + + + + + +
+

+ Defined in + LTDescr.cs:1914 +

+ + + +
+ +
+

Have a method called when the tween finishes

+ +
+ +
+

Parameters:

+ +
    +
  • + onComplete:Action + Action + + +
    +

    the method that should be called when the tween is finished ex: tweenFinished(){ }

    + +
    + +
  • +
+
+ +
+

Returns:

+ +
+ LTDescr: +

LTDescr an object that distinguishes the tween

+ +
+
+ +
+

Example:

+ +
+

LeanTween.moveX(gameObject, 5f, 2.0f ).setOnComplete( tweenFinished );

+ +
+
+
+
+

setOnComplete (object)

+ +
+ (
    +
  • + onComplete:Action<object> +
  • +
) +
+ + + LTDescr + + + + + + + + +
+

+ Defined in + LTDescr.cs:1928 +

+ + + +
+ +
+

Have a method called when the tween finishes

+ +
+ +
+

Parameters:

+ +
    +
  • + onComplete:Action<object> + Action + + +
    +

    the method that should be called when the tween is finished ex: tweenFinished( object myObj ){ }

    + +
    + + + + + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.moveX(gameObject, 5f, 2.0f ).setOnComplete( tweenFinished );

    + +
    +
    + +
    +

    setOnCompleteOnRepeat

    + +
    + (
      +
    • + isOn:bool +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LTDescr.cs:2174 +

    + + + +
    + +
    +

    Set the onComplete method to be called at the end of every loop cycle (also applies to the delayedCall method)

    + +
    + +
    +

    Parameters:

    + +
      +
    • + isOn:bool + Bool + + +
      +

      does call onComplete on every loop cycle

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.delayedCall(gameObject,0.3f, delayedMethod).setRepeat(4).setOnCompleteOnRepeat(true);

    + +
    +
    +
    +
    +

    setOnCompleteOnStart

    + +
    + (
      +
    • + isOn:bool +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LTDescr.cs:2187 +

    + + + +
    + +
    +

    Set the onComplete method to be called at the beginning of the tween (it will still be called when it is completed as well)

    + +
    + +
    +

    Parameters:

    + +
      +
    • + isOn:bool + Bool + + +
      +

      does call onComplete at the start of the tween

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.delayedCall(gameObject, 2f, ()=>{
    // Flash an object 5 times +  LeanTween.alpha(gameObject, 0f, 1f);
    +  LeanTween.alpha(gameObject, 1f, 0f).setDelay(1f);
    + }).setOnCompleteOnStart(true).setRepeat(5);

    + +
    +
    +
    +
    +

    setOnCompleteParam

    + +
    + (
      +
    • + onComplete:object +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LTDescr.cs:1949 +

    + + + +
    + +
    +

    Pass an object to along with the onComplete Function

    + +
    + +
    +

    Parameters:

    + +
      +
    • + onComplete:object + Object + + +
      +

      an object that

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.delayedCall(1.5f, enterMiniGameStart).setOnCompleteParam( new object[]{""+5} );

    + void enterMiniGameStart( object val ){
    +  object[] arr = (object [])val;
    +  int lvl = int.Parse((string)arr[0]);
    + }

    + +
    +
    +
    +
    +

    setOnStart

    + +
    + (
      +
    • + onStart:Action<> +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LTDescr.cs:2220 +

    + + + +
    + +
    +

    Have a method called when the tween starts

    + +
    + +
    +

    Parameters:

    + +
      +
    • + onStart:Action<> + Action<> + + +
      +

      the method that should be called when the tween is starting ex: tweenStarted( ){ }

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    C#:
    + LeanTween.moveX(gameObject, 5f, 2.0f ).setOnStart( ()=>{ Debug.Log("I started!"); }); + Javascript:
    + LeanTween.moveX(gameObject, 5f, 2.0f ).setOnStart( function(){ Debug.Log("I started!"); } );

    + +
    +
    +
    +
    +

    setOnUpdate

    + +
    + (
      +
    • + onUpdate:Action<float> +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LTDescr.cs:1968 +

    + + + +
    + +
    +

    Have a method called on each frame that the tween is being animated (passes a float value)

    + +
    + +
    +

    Parameters:

    + +
      +
    • + onUpdate:Action<float> + Action + + +
      +

      a method that will be called on every frame with the float value of the tweened object

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.moveX(gameObject, 5f, 2.0f ).setOnUpdate( tweenMoved );
    +
    + void tweenMoved( float val ){ }

    + +
    +
    +
    +
    +

    setOnUpdate (object)

    + +
    + (
      +
    • + onUpdate:Action<float,object> +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LTDescr.cs:2030 +

    + + + +
    + +
    +

    Have a method called on each frame that the tween is being animated (passes a float value and a object)

    + +
    + +
    +

    Parameters:

    + +
      +
    • + onUpdate:Action<float,object> + Action + + +
      +

      a method that will be called on every frame with the float value of the tweened object, and an object of the person's choosing

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.moveX(gameObject, 5f, 2.0f ).setOnUpdate( tweenMoved ).setOnUpdateParam( myObject );
    +
    + void tweenMoved( float val, object obj ){ }

    + +
    +
    +
    +
    +

    setOnUpdate (Vector3)

    + +
    + (
      +
    • + onUpdate:Action<Vector3> +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LTDescr.cs:2064 +

    + + + +
    + +
    +

    Have a method called on each frame that the tween is being animated (passes a float value)

    + +
    + +
    +

    Parameters:

    + +
      +
    • + onUpdate:Action<Vector3> + Action + + +
      +

      a method that will be called on every frame with the float value of the tweened object

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.moveX(gameObject, 5f, 2.0f ).setOnUpdate( tweenMoved );
    +
    + void tweenMoved( Vector3 val ){ }

    + +
    +
    +
    +
    +

    setOnUpdateParam

    + +
    + (
      +
    • + onUpdateParam:object +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LTDescr.cs:2084 +

    + + + +
    + +
    +

    Have an object passed along with the onUpdate method

    + +
    + +
    +

    Parameters:

    + +
      +
    • + onUpdateParam:object + Object + + +
      +

      an object that will be passed along with the onUpdate method

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.moveX(gameObject, 5f, 2.0f ).setOnUpdate( tweenMoved ).setOnUpdateParam( myObject );
    +
    + void tweenMoved( float val, object obj ){ }

    + +
    +
    +
    +
    +

    setOrientToPath

    + +
    + (
      +
    • + doesOrient:bool +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LTDescr.cs:2099 +

    + + + +
    + +
    +

    While tweening along a curve, set this property to true, to be perpendicalur to the path it is moving upon

    + +
    + +
    +

    Parameters:

    + +
      +
    • + doesOrient:bool + Bool + + +
      +

      whether the gameobject will orient to the path it is animating along

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.move( ltLogo, path, 1.0f ).setEase(LeanTweenType.easeOutQuad).setOrientToPath(true).setAxis(Vector3.forward);

    + +
    +
    +
    +
    +

    setOrientToPath2d

    + +
    + (
      +
    • + doesOrient:bool +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LTDescr.cs:2118 +

    + + + +
    + +
    +

    While tweening along a curve, set this property to true, to be perpendicalur to the path it is moving upon

    + +
    + +
    +

    Parameters:

    + +
      +
    • + doesOrient:bool + Bool + + +
      +

      whether the gameobject will orient to the path it is animating along

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.move( ltLogo, path, 1.0f ).setEase(LeanTweenType.easeOutQuad).setOrientToPath2d(true).setAxis(Vector3.forward);

    + +
    +
    +
    +
    +

    setOvershoot

    + +
    + (
      +
    • + overshoot:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LTDescr.cs:1627 +

    + + + +
    + +
    +

    Set how far past a tween will overshoot for certain ease types (compatible: easeInBack, easeInOutBack, easeOutBack, easeOutElastic, easeInElastic, easeInOutElastic).

    + +
    + +
    +

    Parameters:

    + +
      +
    • + overshoot:float + Float + + +
      +

      how far past the destination it will go before settling in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.moveX(gameObject, 5f, 2.0f ).setEase( LeanTweenType.easeOutBack ).setOvershoot(2f);

    + +
    +
    +
    +
    +

    setPassed

    + +
    + (
      +
    • + passedTime:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LTDescr.cs:1747 +

    + + + +
    + +
    +

    Set the point of time the tween will start in

    + +
    + +
    +

    Parameters:

    + +
      +
    • + passedTime:float + Float + + +
      +

      the length of time in seconds the tween will start in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    int tweenId = LeanTween.moveX(gameObject, 5f, 2.0f ).id;
    + // Later
    + LTDescr descr = description( tweenId );
    + descr.setPassed( 1f );

    + +
    +
    +
    +
    +

    setPeriod

    + +
    + (
      +
    • + period:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LTDescr.cs:1640 +

    + + + +
    + +
    +

    Set how short the iterations are for certain ease types (compatible: easeOutElastic, easeInElastic, easeInOutElastic).

    + +
    + +
    +

    Parameters:

    + +
      +
    • + period:float + Float + + +
      +

      how short the iterations are that the tween will animate at (default 0.3f)

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.moveX(gameObject, 5f, 2.0f ).setEase( LeanTweenType.easeOutElastic ).setPeriod(0.3f);

    + +
    +
    +
    +
    +

    setPoint

    + +
    + (
      +
    • + point:Vector3 +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LTDescr.cs:2151 +

    + + + +
    + +
    +

    Set the point at which the GameObject will be rotated around

    + +
    + +
    +

    Parameters:

    + +
      +
    • + point:Vector3 + Vector3 + + +
      +

      point at which you want the object to rotate around (local space)

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.rotateAround( cube, Vector3.up, 360.0f, 1.0f ) .setPoint( new Vector3(1f,0f,0f) ) .setEase( LeanTweenType.easeInOutBounce );

    + +
    +
    +
    +
    +

    setRecursive

    + +
    + (
      +
    • + useRecursion:bool +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LTDescr.cs:2268 +

    + + + +
    + +
    +

    Set whether or not the tween will recursively effect an objects children in the hierarchy

    + +
    + +
    +

    Parameters:

    + +
      +
    • + useRecursion:bool + Bool + + +
      +

      whether the tween will recursively effect an objects children in the hierarchy

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.alpha(gameObject, 0f, 1f).setRecursive(true);

    + +
    +
    +
    +
    +

    setRepeat

    + +
    + (
      +
    • + repeatNum:int +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LTDescr.cs:1796 +

    + + + +
    + +
    +

    Set the tween to repeat a number of times.

    + +
    + +
    +

    Parameters:

    + +
      +
    • + repeatNum:int + Int + + +
      +

      the number of times to repeat the tween. -1 to repeat infinite times

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.moveX(gameObject, 5f, 2.0f ).setRepeat( 10 ).setLoopPingPong();

    + +
    +
    +
    +
    +

    setScale

    + +
    + (
      +
    • + scale:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LTDescr.cs:1653 +

    + + + +
    + +
    +

    Set how large the effect is for certain ease types (compatible: punch, shake, animation curves).

    + +
    + +
    +

    Parameters:

    + +
      +
    • + scale:float + Float + + +
      +

      how much the ease will be multiplied by (default 1f)

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.moveX(gameObject, 5f, 2.0f ).setEase( LeanTweenType.punch ).setScale(2f);

    + +
    +
    +
    +
    +

    setSpeed

    + +
    + (
      +
    • + speed:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LTDescr.cs:1781 +

    + + + +
    + +
    +

    Set the finish time of the tween

    + +
    + +
    +

    Parameters:

    + +
      +
    • + speed:float + Float + + +
      +

      the speed in unity units per second you wish the object to travel (overrides the given time)

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.moveLocalZ( gameObject, 10f, 1f).setSpeed(0.2f) // the given time is ignored when speed is set

    + +
    +
    +
    +
    +

    setTime

    + +
    + (
      +
    • + finishTime:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LTDescr.cs:1763 +

    + + + +
    + +
    +

    Set the finish time of the tween

    + +
    + +
    +

    Parameters:

    + +
      +
    • + finishTime:float + Float + + +
      +

      the length of time in seconds you wish the tween to complete in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    int tweenId = LeanTween.moveX(gameObject, 5f, 2.0f ).id;
    + // Later
    + LTDescr descr = description( tweenId );
    + descr.setTime( 1f );

    + +
    +
    +
    +
    +

    setTo

    + +
    + (
      +
    • + to:Vector3 +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LTDescr.cs:1681 +

    + + + +
    + +
    +

    Set the end that the GameObject is tweening towards

    + +
    + +
    +

    Parameters:

    + +
      +
    • + to:Vector3 + Vector3 + + +
      +

      point at which you want the tween to reach

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LTDescr descr = LeanTween.move( cube, Vector3.up, new Vector3(1f,3f,0f), 1.0f ).setEase( LeanTweenType.easeInOutBounce );
    + // Later your want to change your destination or your destiation is constantly moving
    + descr.setTo( new Vector3(5f,10f,3f) );

    + +
    +
    +
    +
    +

    setUseFrames

    + +
    + (
      +
    • + useFrames:bool +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LTDescr.cs:1840 +

    + + + +
    + +
    +

    Use frames when tweening an object, when you don't want the animation to be time-frame independent...

    + +
    + +
    +

    Parameters:

    + +
      +
    • + useFrames:bool + Bool + + +
      +

      whether to use estimated time or not

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.moveX(gameObject, 5f, 2.0f ).setRepeat( 2 ).setUseFrames( true );

    + +
    +
    +
    +
    +

    updateNow

    + + () + + + LTDescr + + + + + + + + +
    +

    + Defined in + LTDescr.cs:925 +

    + + + +
    + +
    +

    If you need a tween to happen immediately instead of waiting for the next Update call, you can force it with this method

    + +
    + + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.moveX(gameObject, 5f, 0f ).updateNow();

    + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LTDescr.html.meta b/GGJ2020/Assets/LeanTween/Documentation/classes/LTDescr.html.meta new file mode 100644 index 0000000..bbd5916 --- /dev/null +++ b/GGJ2020/Assets/LeanTween/Documentation/classes/LTDescr.html.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 728d9c45462a9409f8b8be1447f59e94 diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LTEvent.html b/GGJ2020/Assets/LeanTween/Documentation/classes/LTEvent.html new file mode 100644 index 0000000..39fe0e4 --- /dev/null +++ b/GGJ2020/Assets/LeanTween/Documentation/classes/LTEvent.html @@ -0,0 +1,238 @@ + + + + + LTEvent + + + + + + + + + + + +
    +
    +
    +

    - Developed by Dented Pixel
    +
    +
    + API Docs for: LeanTween 2.46
    + + + + + +
    +

    Support LeanTween!

    + +
    +
    + + + + + + + +
    +
    +
    + +

    Maintaining and adding new features takes time, your support is appreciated.

    +
    +
    + + +
    +
    + Show: + + + + + + + +
    + +
    +
    +
    +

    LTEvent Class

    +
    + + +
    + Defined in: LeanTween.cs:3454 +
    + + +
    + + +
    +

    Object that describes the event to an event listener

    + +
    + +
    +

    Constructor

    +
    +

    LTEvent

    + +
    + (
      +
    • + data:object +
    • +
    ) +
    + + + + + + + + +
    +

    + Defined in + LeanTween.cs:3454 +

    + + + +
    + +
    + +
    + +
    +

    Parameters:

    + +
      +
    • + data:object + Object + + +
      +

      Data that has been passed from the dispatchEvent method

      + +
      + +
    • +
    +
    + + +
    +
    + +
    + + +
    +
    +

    Item Index

    + + + + +
    + + + + +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LTEvent.html.meta b/GGJ2020/Assets/LeanTween/Documentation/classes/LTEvent.html.meta new file mode 100644 index 0000000..7dd3032 --- /dev/null +++ b/GGJ2020/Assets/LeanTween/Documentation/classes/LTEvent.html.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 2b8203605b4454b009a6fc1e269a8d50 diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LTRect.html b/GGJ2020/Assets/LeanTween/Documentation/classes/LTRect.html new file mode 100644 index 0000000..a8f4d97 --- /dev/null +++ b/GGJ2020/Assets/LeanTween/Documentation/classes/LTRect.html @@ -0,0 +1,360 @@ + + + + + LTRect + + + + + + + + + + + +
    +
    +
    +

    - Developed by Dented Pixel
    +
    +
    + API Docs for: LeanTween 2.46
    + + + + + +
    +

    Support LeanTween!

    + +
    +
    + + + + + + + +
    +
    +
    + +

    Maintaining and adding new features takes time, your support is appreciated.

    +
    +
    + + +
    +
    + Show: + + + + + + + +
    + +
    +
    +
    +

    LTRect Class

    +
    + + +
    + Defined in: LeanTween.cs:3212 +
    + + +
    + + +
    +

    Animate GUI Elements by creating this object and passing the *.rect variable to the GUI method

    + Example Javascript:
    var bRect:LTRect = new LTRect( 0, 0, 100, 50 );
    + LeanTween.scale( bRect, Vector2(bRect.rect.width, bRect.rect.height) * 1.3, 0.25 );
    + function OnGUI(){
    +   if(GUI.Button(bRect.rect, "Scale")){ }
    + }
    +
    + Example C#:
    + LTRect bRect = new LTRect( 0f, 0f, 100f, 50f );
    + LeanTween.scale( bRect, new Vector2(150f,75f), 0.25f );
    + void OnGUI(){
    +   if(GUI.Button(bRect.rect, "Scale")){ }
    + }

    + +
    + +
    +

    Constructor

    +
    +

    LTRect

    + +
    + (
      +
    • + x:float +
    • +
    • + y:float +
    • +
    • + width:float +
    • +
    • + height:float +
    • +
    • + alpha:float +
    • +
    • + rotation:float +
    • +
    ) +
    + + + + + + + + +
    +

    + Defined in + LeanTween.cs:3212 +

    + + + +
    + +
    + +
    + +
    +

    Parameters:

    + +
      +
    • + x:float + Float + + +
      +

      X location

      + +
      + +
    • +
    • + y:float + Float + + +
      +

      Y location

      + +
      + +
    • +
    • + width:float + Float + + +
      +

      Width

      + +
      + +
    • +
    • + height:float + Float + + +
      +

      Height

      + +
      + +
    • +
    • + alpha:float + Float + + +
      +

      (Optional) initial alpha amount (0-1)

      + +
      + +
    • +
    • + rotation:float + Float + + +
      +

      (Optional) initial rotation in degrees (0-360)

      + +
      + +
    • +
    +
    + + +
    +
    + +
    + + +
    +
    +

    Item Index

    + + +
    +

    Properties

    + + +
    + + +
    + + +
    +

    Properties

    + +
    +

    rect

    + Rect rect:Rect Rect object that controls the positioning and size + + + + + +
    +

    + Defined in + LeanTween.cs:3239 +

    + + +
    + +
    +

    Pass this value to the GUI Methods

    + +
    + + + +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LTRect.html.meta b/GGJ2020/Assets/LeanTween/Documentation/classes/LTRect.html.meta new file mode 100644 index 0000000..feec8d2 --- /dev/null +++ b/GGJ2020/Assets/LeanTween/Documentation/classes/LTRect.html.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: b7ee5979c5f5f428d9c8735d84e09421 diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LTSeq.html b/GGJ2020/Assets/LeanTween/Documentation/classes/LTSeq.html new file mode 100644 index 0000000..1248c6e --- /dev/null +++ b/GGJ2020/Assets/LeanTween/Documentation/classes/LTSeq.html @@ -0,0 +1,535 @@ + + + + + LTSeq + + + + + + + + + + + +
    +
    +
    +

    - Developed by Dented Pixel
    +
    +
    + API Docs for: LeanTween 2.46
    + + + + + +
    +

    Support LeanTween!

    + +
    +
    + + + + + + + +
    +
    +
    + +

    Maintaining and adding new features takes time, your support is appreciated.

    +
    +
    + + +
    +
    + Show: + + + + + + + +
    + +
    +
    +
    +

    LTSeq Class

    +
    + + +
    + Defined in: LTSeq.cs:5 +
    + + +
    + + +
    +

    Internal Representation of a Sequence
    +
    +   

    Example:

    + var seq = LeanTween.sequence();
    + seq.append(1f); // delay everything one second
    + seq.append( () => { // fire an event before start
    +  Debug.Log("I have started");
    + });
    + seq.append( LeanTween.move(cube1, Vector3.one * 10f, 1f) ); // do a tween
    + seq.append( (object obj) => { // fire event after tween
    +  var dict = obj as Dictionary<string,string>;
    +  Debug.Log("We are done now obj value:"+dict["hi"]);
    + }, new Dictionary<string,string>(){ {"hi","sup"} } );

    + +
    + +
    +

    Constructor

    +
    +

    LTSeq

    + + () + + + + + + + + +
    +

    + Defined in + LTSeq.cs:5 +

    + + + +
    + +
    + +
    + + + +
    +
    + +
    + + +
    +
    +

    Item Index

    + +
    +

    Methods

    + + +
    + + + +
    + +
    +

    Methods

    + +
    +

    add (method(object))

    + +
    + (
      +
    • + callback:System.Action +
    • +
    ) +
    + + + LTSeq + + + + + + + + +
    +

    + Defined in + LTSeq.cs:132 +

    + + + +
    + +
    +

    Add a time delay to the sequence

    + +
    + +
    +

    Parameters:

    + +
      +
    • + callback:System.Action + System.Action + + +
      +

      method you want to be called

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTSeq: +

    LTSeq an object that you can add tweens, methods and time on to

    + +
    +
    + +
    +

    Example:

    + +
    +

    var seq = LeanTween.sequence();
    + seq.append( () => { // fire an event before start
    +  Debug.Log("I have started");
    + });
    + seq.append( LeanTween.move(cube1, Vector3.one * 10f, 1f) ); // do a tween
    + seq.append((object obj) => { // fire event after tween +  var dict = obj as Dictionary<string,string>; +  Debug.Log("We are done now obj value:"+dict["hi"]); +  }, new Dictionary<string,string>(){ {"hi","sup"} } );

    + +
    +
    +
    +
    +

    add (tween)

    + + () + + + LTSeq + + + + + + + + +
    +

    + Defined in + LTSeq.cs:166 +

    + + + +
    + +
    +

    Retrieve a sequencer object where you can easily chain together tweens and methods one after another

    + +
    + + +
    +

    Returns:

    + +
    + LTSeq: +

    LTSeq an object that you can add tweens, methods and time on to

    + +
    +
    + +
    +

    Example:

    + +
    +

    var seq = LeanTween.sequence();
    + seq.append( LeanTween.move(cube1, Vector3.one * 10f, 1f) ); // do a move tween
    + seq.append( LeanTween.rotateAround( avatar1, Vector3.forward, 360f, 1f ) ); // then do a rotate tween

    + +
    +
    +
    +
    +

    append (delay)

    + +
    + (
      +
    • + delay:float +
    • +
    ) +
    + + + LTSeq + + + + + + + + +
    +

    + Defined in + LTSeq.cs:94 +

    + + + +
    + +
    +

    Add a time delay to the sequence

    + +
    + +
    +

    Parameters:

    + +
      +
    • + delay:float + Float + + +
      +

      amount of time to add to the sequence

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTSeq: +

    LTDescr an object that distinguishes the tween + var seq = LeanTween.sequence();
    + seq.append(1f); // delay everything one second
    + seq.append( LeanTween.move(cube1, Vector3.one * 10f, 1f) ); // do a tween

    + +
    +
    + +
    +
    +

    append (method)

    + +
    + (
      +
    • + callback:System.Action +
    • +
    ) +
    + + + LTSeq + + + + + + + + +
    +

    + Defined in + LTSeq.cs:109 +

    + + + +
    + +
    +

    Add a time delay to the sequence

    + +
    + +
    +

    Parameters:

    + +
      +
    • + callback:System.Action + System.Action + + +
      +

      method you want to be called

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTSeq: +

    LTSeq an object that you can add tweens, methods and time on to

    + +
    +
    + +
    +

    Example:

    + +
    +

    var seq = LeanTween.sequence();
    + seq.append( () => { // fire an event before start
    +  Debug.Log("I have started");
    + });
    + seq.append( LeanTween.move(cube1, Vector3.one * 10f, 1f) ); // do a tween
    + seq.append( () => { // fire event after tween
    +  Debug.Log("We are done now");
    + });;

    + +
    +
    +
    +
    + + + +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LTSeq.html.meta b/GGJ2020/Assets/LeanTween/Documentation/classes/LTSeq.html.meta new file mode 100644 index 0000000..5581cf4 --- /dev/null +++ b/GGJ2020/Assets/LeanTween/Documentation/classes/LTSeq.html.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c2208e3213ef84ee28cb1745e7eb9b26 +timeCreated: 1488755637 +licenseType: Store +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LTSpline.html b/GGJ2020/Assets/LeanTween/Documentation/classes/LTSpline.html new file mode 100644 index 0000000..a0dace3 --- /dev/null +++ b/GGJ2020/Assets/LeanTween/Documentation/classes/LTSpline.html @@ -0,0 +1,797 @@ + + + + + LTSpline + + + + + + + + + + + +
    +
    +
    +

    - Developed by Dented Pixel
    +
    +
    + API Docs for: LeanTween 2.46
    + + + + + +
    +

    Support LeanTween!

    + +
    +
    + + + + + + + +
    +
    +
    + +

    Maintaining and adding new features takes time, your support is appreciated.

    +
    +
    + + +
    +
    + Show: + + + + + + + +
    + +
    +
    +
    +

    LTSpline Class

    +
    + + +
    + Defined in: LeanTween.cs:2774 +
    + + +
    + + +
    +

    Animate along a set of points that need to be in the format: controlPoint, point1, point2.... pointLast, endControlPoint

    Move a GameObject to a certain location

    + +
    + +
    +

    Constructor

    +
    +

    LTSpline

    + +
    + (
      +
    • + pts +
    • +
    ) +
    + + + + + + + + +
    +

    + Defined in + LeanTween.cs:2774 +

    + + + +
    + +
    + +
    + +
    +

    Parameters:

    + +
      +
    • + pts + Vector3 Array + + +
      +

      A set of points that define the points the path will pass through (starting with starting control point, and ending with a control point)
      + Note: The first and last item just define the angle of the end points, they are not actually used in the spline path itself. If you do not care about the angle you can jus set the first two items and last two items as the same value.

      + +
      + +
    • +
    +
    + + +
    +

    Example:

    + +
    +

    LTSpline ltSpline = new LTSpline( new Vector3[] { new Vector3(0f,0f,0f),new Vector3(0f,0f,0f), new Vector3(0f,0.5f,0f), new Vector3(1f,1f,0f), new Vector3(1f,1f,0f)} );

    + LeanTween.moveSpline(lt, ltSpline.vec3, 4.0f).setOrientToPath(true).setDelay(1f).setEase(LeanTweenType.easeInOutQuad); // animate
    + Vector3 pt = ltSpline.point( 0.6f ); // retrieve a point along the path

    + +
    +
    +
    +
    + +
    + + +
    +
    +

    Item Index

    + +
    +

    Methods

    + + +
    + + + + +
    + +
    +

    Methods

    + +
    +

    place

    + +
    + (
      +
    • + transform:Transform +
    • +
    • + ratio:float +
    • +
    ) +
    + + + + + + + + +
    +

    + Defined in + LeanTween.cs:2992 +

    + + + +
    + +
    +

    Place an object along a certain point on the path (facing the direction perpendicular to the path)

    Move a GameObject to a certain location

    + +
    + +
    +

    Parameters:

    + +
      +
    • + transform:Transform + Transform + + +
      +

      the transform of the object you wish to place along the path

      + +
      + +
    • +
    • + ratio:float + Float + + +
      +

      ratio of the point along the path you wish to receive (0-1)

      + +
      + +
    • +
    +
    + + +
    +

    Example:

    + +
    +

    ltPath.place( transform, 0.6f );

    + +
    +
    +
    +
    +

    place

    + +
    + (
      +
    • + transform:Transform +
    • +
    • + ratio:float +
    • +
    • + rotation:Vector3 +
    • +
    ) +
    + + + + + + + + +
    +

    + Defined in + LeanTween.cs:3005 +

    + + + +
    + +
    +

    Place an object along a certain point on the path, with it facing a certain direction perpendicular to the path

    Move a GameObject to a certain location

    + +
    + +
    +

    Parameters:

    + +
      +
    • + transform:Transform + Transform + + +
      +

      the transform of the object you wish to place along the path

      + +
      + +
    • +
    • + ratio:float + Float + + +
      +

      ratio of the point along the path you wish to receive (0-1)

      + +
      + +
    • +
    • + rotation:Vector3 + Vector3 + + +
      +

      the direction in which to place the transform ex: Vector3.up

      + +
      + +
    • +
    +
    + + +
    +

    Example:

    + +
    +

    ltPath.place( transform, 0.6f, Vector3.left );

    + +
    +
    +
    +
    +

    placeLocal

    + +
    + (
      +
    • + transform:Transform +
    • +
    • + ratio:float +
    • +
    ) +
    + + + + + + + + +
    +

    + Defined in + LeanTween.cs:3024 +

    + + + +
    + +
    +

    Place an object along a certain point on the path (facing the direction perpendicular to the path) - Local Space, not world-space

    Move a GameObject to a certain location

    + +
    + +
    +

    Parameters:

    + +
      +
    • + transform:Transform + Transform + + +
      +

      the transform of the object you wish to place along the path

      + +
      + +
    • +
    • + ratio:float + Float + + +
      +

      ratio of the point along the path you wish to receive (0-1)

      + +
      + +
    • +
    +
    + + +
    +

    Example:

    + +
    +

    ltPath.placeLocal( transform, 0.6f );

    + +
    +
    +
    +
    +

    placeLocal

    + +
    + (
      +
    • + transform:Transform +
    • +
    • + ratio:float +
    • +
    • + rotation:Vector3 +
    • +
    ) +
    + + + + + + + + +
    +

    + Defined in + LeanTween.cs:3037 +

    + + + +
    + +
    +

    Place an object along a certain point on the path, with it facing a certain direction perpendicular to the path - Local Space, not world-space

    Move a GameObject to a certain location

    + +
    + +
    +

    Parameters:

    + +
      +
    • + transform:Transform + Transform + + +
      +

      the transform of the object you wish to place along the path

      + +
      + +
    • +
    • + ratio:float + Float + + +
      +

      ratio of the point along the path you wish to receive (0-1)

      + +
      + +
    • +
    • + rotation:Vector3 + Vector3 + + +
      +

      the direction in which to place the transform ex: Vector3.up

      + +
      + +
    • +
    +
    + + +
    +

    Example:

    + +
    +

    ltPath.placeLocal( transform, 0.6f, Vector3.left );

    + +
    +
    +
    +
    +

    point

    + +
    + (
      +
    • + ratio:float +
    • +
    ) +
    + + + Vector3 + + + + + + + + +
    +

    + Defined in + LeanTween.cs:2951 +

    + + + +
    + +
    +

    Retrieve a point along a path

    Move a GameObject to a certain location

    + +
    + +
    +

    Parameters:

    + +
      +
    • + ratio:float + Float + + +
      +

      ratio of the point along the path you wish to receive (0-1)

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + Vector3: +

    Vector3 position of the point along the path

    + +
    +
    + +
    +

    Example:

    + +
    +

    transform.position = ltSpline.point( 0.6f );

    + +
    +
    +
    +
    +

    ratioAtPoint

    + +
    + (
      +
    • + point:Vector3 +
    • +
    ) +
    + + + Float + + + + + + + + +
    +

    + Defined in + LeanTween.cs:2927 +

    + + + +
    + +
    +

    Retrieve a point along a path

    Move a GameObject to a certain location

    + +
    + +
    +

    Parameters:

    + +
      +
    • + point:Vector3 + Vector3 + + +
      +

      given a current location it makes the best approximiation of where it is along the path ratio-wise (0-1)

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + Float: +

    float of ratio along the path

    + +
    +
    + +
    +

    Example:

    + +
    +

    ratioIter = ltSpline.ratioAtPoint( transform.position );

    + +
    +
    +
    +
    + +
    +

    Properties

    + +
    +

    distance distance of the spline (in unity units)

    + Float + + + + + +
    +

    + Defined in + LeanTween.cs:2790 +

    + + +
    + +
    + +
    + + + +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LTSpline.html.meta b/GGJ2020/Assets/LeanTween/Documentation/classes/LTSpline.html.meta new file mode 100644 index 0000000..49235af --- /dev/null +++ b/GGJ2020/Assets/LeanTween/Documentation/classes/LTSpline.html.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 1adcbb4b77b884a4fb75bde98799d037 diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LeanAudio.html b/GGJ2020/Assets/LeanTween/Documentation/classes/LeanAudio.html new file mode 100644 index 0000000..ec64577 --- /dev/null +++ b/GGJ2020/Assets/LeanTween/Documentation/classes/LeanAudio.html @@ -0,0 +1,333 @@ + + + + + LeanAudio + + + + + + + + + + + +
    +
    +
    +

    - Developed by Dented Pixel
    +
    +
    + API Docs for: LeanTween 2.46
    + + + + + +
    +

    Support LeanTween!

    + +
    +
    + + + + + + + +
    +
    +
    + +

    Maintaining and adding new features takes time, your support is appreciated.

    +
    +
    + + +
    +
    + Show: + + + + + + + +
    + +
    +
    +
    +

    LeanAudio Class

    +
    + + +
    + Defined in: LeanAudio.cs:30 +
    + + +
    + + +
    +

    Create Audio dynamically and easily playback

    + +
    + +
    +

    Constructor

    +
    +

    LeanAudio

    + + () + + + + + + + + +
    +

    + Defined in + LeanAudio.cs:30 +

    + + + +
    + +
    + +
    + + + +
    +
    + +
    + + +
    +
    +

    Item Index

    + +
    +

    Methods

    + + +
    + + + +
    + +
    +

    Methods

    + +
    +

    createAudio

    + +
    + (
      +
    • + volumeCurve:AnimationCurve +
    • +
    • + frequencyCurve:AnimationCurve +
    • +
    • + options:LeanAudioOptions +
    • +
    ) +
    + + + AudioClip + + + + + + + + +
    +

    + Defined in + LeanAudio.cs:65 +

    + + + +
    + +
    +

    Create dynamic audio from a set of Animation Curves and other options.

    + +
    + +
    +

    Parameters:

    + +
      +
    • + volumeCurve:AnimationCurve + AnimationCurve + + +
      +

      describing the shape of the audios volume (from 0-1). The length of the audio is dicated by the end value here.

      + +
      + +
    • +
    • + frequencyCurve:AnimationCurve + AnimationCurve + + +
      +

      describing the width of the oscillations between the sound waves in seconds. Large numbers mean a lower note, while higher numbers mean a tighter frequency and therefor a higher note. Values are usually between 0.01 and 0.000001 (or smaller)

      + +
      + +
    • +
    • + options:LeanAudioOptions + LeanAudioOptions + + +
      +

      You can pass any other values in here like vibrato or the frequency you would like the sound to be encoded at. See LeanAudioOptions for more details.

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + AudioClip: +

    AudioClip of the procedurally generated audio

    + +
    +
    + +
    +

    Example:

    + +
    +

    AnimationCurve volumeCurve = new AnimationCurve( new Keyframe(0f, 1f, 0f, -1f), new Keyframe(1f, 0f, -1f, 0f));
    + AnimationCurve frequencyCurve = new AnimationCurve( new Keyframe(0f, 0.003f, 0f, 0f), new Keyframe(1f, 0.003f, 0f, 0f));
    + AudioClip audioClip = LeanAudio.createAudio(volumeCurve, frequencyCurve, LeanAudio.options().setVibrato( new Vector3[]{ new Vector3(0.32f,0f,0f)} ));

    + +
    +
    +
    +
    + + + +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LeanAudio.html.meta b/GGJ2020/Assets/LeanTween/Documentation/classes/LeanAudio.html.meta new file mode 100644 index 0000000..c466510 --- /dev/null +++ b/GGJ2020/Assets/LeanTween/Documentation/classes/LeanAudio.html.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: ddb683830b7524ebb8b302202c645c65 diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LeanAudioOptions.html b/GGJ2020/Assets/LeanTween/Documentation/classes/LeanAudioOptions.html new file mode 100644 index 0000000..8fa60ab --- /dev/null +++ b/GGJ2020/Assets/LeanTween/Documentation/classes/LeanAudioOptions.html @@ -0,0 +1,384 @@ + + + + + LeanAudioOptions + + + + + + + + + + + +
    +
    +
    +

    - Developed by Dented Pixel
    +
    +
    + API Docs for: LeanTween 2.46
    + + + + + +
    +

    Support LeanTween!

    + +
    +
    + + + + + + + +
    +
    +
    + +

    Maintaining and adding new features takes time, your support is appreciated.

    +
    +
    + + +
    +
    + Show: + + + + + + + +
    + +
    +
    +
    +

    LeanAudioOptions Class

    +
    + + +
    + Defined in: LeanAudio.cs:316 +
    + + +
    + + +
    +

    Pass in options to LeanAudio

    + +
    + +
    +

    Constructor

    +
    +

    LeanAudioOptions

    + + () + + + + + + + + +
    +

    + Defined in + LeanAudio.cs:316 +

    + + + +
    + +
    + +
    + + + +
    +
    + +
    + + +
    +
    +

    Item Index

    + +
    +

    Methods

    + + +
    + + + +
    + +
    +

    Methods

    + +
    +

    setFrequency

    + +
    + (
      +
    • + frequencyRate:int +
    • +
    ) +
    + + + LeanAudioOptions + + + + + + + + +
    +

    + Defined in + LeanAudio.cs:343 +

    + + + +
    + +
    +

    Set the frequency for the audio is encoded. 44100 is CD quality, but you can usually get away with much lower (or use a lower amount to get a more 8-bit sound).

    + +
    + +
    +

    Parameters:

    + +
      +
    • + frequencyRate:int + Int + + +
      +

      of the frequency you wish to encode the AudioClip at

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LeanAudioOptions: +

    LeanAudioOptions describing optional values

    + +
    +
    + +
    +

    Example:

    + +
    +

    AnimationCurve volumeCurve = new AnimationCurve( new Keyframe(0f, 1f, 0f, -1f), new Keyframe(1f, 0f, -1f, 0f));
    + AnimationCurve frequencyCurve = new AnimationCurve( new Keyframe(0f, 0.003f, 0f, 0f), new Keyframe(1f, 0.003f, 0f, 0f));
    + AudioClip audioClip = LeanAudio.createAudio(volumeCurve, frequencyCurve, LeanAudio.options().setVibrato( new Vector3[]{ new Vector3(0.32f,0f,0f)} ).setFrequency(12100) );

    + +
    +
    +
    +
    +

    setVibrato

    + +
    + (
      +
    • + vibratoArray:Vector3[] +
    • +
    ) +
    + + + LeanAudioOptions + + + + + + + + +
    +

    + Defined in + LeanAudio.cs:359 +

    + + + +
    + +
    +

    Set details about the shape of the curve by adding vibrato modulations through it (alters the peak values giving it a wah-wah effect). You can add as many as you want to sculpt out more detail in the sound wave.

    + +
    + +
    +

    Parameters:

    + +
      +
    • + vibratoArray:Vector3[] + Vector3 + + +
      +

      The first value is the period in seconds that you wish to have the vibrato wave fluctuate at. The second value is the minimum height you wish the vibrato wave to dip down to (default is zero). The third is reserved for future effects.

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LeanAudioOptions: +

    LeanAudioOptions describing optional values

    + +
    +
    + +
    +

    Example:

    + +
    +

    AnimationCurve volumeCurve = new AnimationCurve( new Keyframe(0f, 1f, 0f, -1f), new Keyframe(1f, 0f, -1f, 0f));
    + AnimationCurve frequencyCurve = new AnimationCurve( new Keyframe(0f, 0.003f, 0f, 0f), new Keyframe(1f, 0.003f, 0f, 0f));
    + AudioClip audioClip = LeanAudio.createAudio(volumeCurve, frequencyCurve, LeanAudio.options().setVibrato( new Vector3[]{ new Vector3(0.32f,0.3f,0f)} ).setFrequency(12100) );

    + +
    +
    +
    +
    + + + +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LeanAudioOptions.html.meta b/GGJ2020/Assets/LeanTween/Documentation/classes/LeanAudioOptions.html.meta new file mode 100644 index 0000000..fcb8d15 --- /dev/null +++ b/GGJ2020/Assets/LeanTween/Documentation/classes/LeanAudioOptions.html.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: ff952359765254c20b97874f5949c0d7 diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LeanTween.html b/GGJ2020/Assets/LeanTween/Documentation/classes/LeanTween.html new file mode 100644 index 0000000..ae7b458 --- /dev/null +++ b/GGJ2020/Assets/LeanTween/Documentation/classes/LeanTween.html @@ -0,0 +1,7523 @@ + + + + + LeanTween + + + + + + + + + + + +
    +
    +
    +

    - Developed by Dented Pixel
    +
    +
    + API Docs for: LeanTween 2.46
    + + + + + +
    +

    Support LeanTween!

    + +
    +
    + + + + + + + +
    +
    +
    + +

    Maintaining and adding new features takes time, your support is appreciated.

    +
    +
    + + +
    +
    + Show: + + + + + + + +
    + +
    +
    +
    +

    LeanTween Class

    +
    + + +
    + Defined in: LeanTween.cs:207 +
    + + +
    + + +
    +

    LeanTween is an efficient tweening engine for Unity3d

    + Index of All Methods | Optional Paramaters that can be passed

    + Optional Parameters are passed at the end of every method
    +
    + Example:
    + LeanTween.moveX( gameObject, 1f, 1f).setEase( LeanTweenType.easeInQuad ).setDelay(1f);
    +
    + You can pass the optional parameters in any order, and chain on as many as you wish!

    + You can also modify this tween later, just save the unique id of the tween.
    +

    Example:

    + int id = LeanTween.moveX(gameObject, 1f, 1f).id;
    + LTDescr d = LeanTween.descr( id );

    + if(d!=null){ // if the tween has already finished it will return null
    +    // change some parameters
    +    d.setOnComplete( onCompleteFunc ).setEase( LeanTweenType.easeInOutBack );
    + }

    + +
    + + +
    + + +
    +
    +

    Item Index

    + +
    +

    Methods

    + + +
    + + + +
    + +
    +

    Methods

    + +
    +

    LeanTween.addListener

    + +
    + (
      +
    • + caller:GameObject +
    • +
    • + eventId:int +
    • +
    • + callback:System.Action<LTEvent> +
    • +
    ) +
    + + + + + + + + +
    +

    + Defined in + LeanTween.cs:2391 +

    + + + +
    + +
    +

    Add a listener method to be called when the appropriate LeanTween.dispatchEvent is called

    + +
    + +
    +

    Parameters:

    + +
      +
    • + caller:GameObject + GameObject + + +
      +

      the gameObject the listener is attached to

      + +
      + +
    • +
    • + eventId:int + Int + + +
      +

      a unique int that describes the event (best to use an enum)

      + +
      + +
    • +
    • + callback:System.Action<LTEvent> + System.Action + + +
      +

      the method to call when the event has been dispatched

      + +
      + +
    • +
    +
    + + +
    +

    Example:

    + +
    +

    LeanTween.addListener(gameObject, (int)MyEvents.JUMP, jumpUp);
    +
    + void jumpUp( LTEvent e ){ Debug.Log("jump!"); }

    + +
    +
    +
    +
    +

    LeanTween.alpha

    + +
    + (
      +
    • + ltRect:LTRect +
    • +
    • + to:float +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1030 +

    + + + +
    + +
    +

    Fade a GUI Object

    Fade a GUI Object

    + +
    + +
    +

    Parameters:

    + +
      +
    • + ltRect:LTRect + LTRect + + +
      +

      LTRect that you wish to fade

      + +
      + +
    • +
    • + to:float + Float + + +
      +

      the final alpha value (0-1)

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      The time with which to fade the object

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.alpha(ltRect, 1f, 1f) .setEase(LeanTweenType.easeInCirc);

    + +
    +
    +
    +
    +

    LeanTween.alpha

    + +
    + (
      +
    • + gameObject:GameObject +
    • +
    • + to:float +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:966 +

    + + + +
    + +
    +

    Fade a gameobject's material to a certain alpha value. The material's shader needs to support alpha. Owl labs has some excellent efficient shaders.

    Fade a gameobject's material to a certain alpha value.

    + +
    + +
    +

    Parameters:

    + +
      +
    • + gameObject:GameObject + GameObject + + +
      +

      Gameobject that you wish to fade

      + +
      + +
    • +
    • + to:float + Float + + +
      +

      the final alpha value (0-1)

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      The time with which to fade the object

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.alpha(gameObject, 1f, 1f) .setDelay(1f);

    + +
    +
    +
    +
    +

    LeanTween.alpha (RectTransform)

    + +
    + (
      +
    • + rectTrans:RectTransform +
    • +
    • + to:float +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:2008 +

    + + + +
    + +
    +

    Alpha an Image Component attached to a RectTransform (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...)

    Alpha an Image Component attached to a RectTransform (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...)

    + +
    + +
    +

    Parameters:

    + +
      +
    • + rectTrans:RectTransform + RectTransform + + +
      +

      RectTransform that you wish to attach the tween to

      + +
      + +
    • +
    • + to:float + Float + + +
      +

      The final Vector3 with which to tween to (localScale)

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      The time to complete the tween in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.alpha(gameObject.GetComponent<RectTransform>(), 0.5f, 1f).setDelay(1f);

    + +
    +
    +
    +
    +

    LeanTween.alpha (RectTransform)

    + +
    + (
      +
    • + rectTrans:RectTransform +
    • +
    • + to:float +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:2022 +

    + + + +
    + +
    +

    Change the Color of an Image Component attached to a RectTransform (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...)

    Change the Color of an Image Component attached to a RectTransform (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...)

    + +
    + +
    +

    Parameters:

    + +
      +
    • + rectTrans:RectTransform + RectTransform + + +
      +

      RectTransform that you wish to attach the tween to

      + +
      + +
    • +
    • + to:float + Float + + +
      +

      The final Vector3 with which to tween to (localScale)

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      The time to complete the tween in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.color(gameObject.GetComponent<RectTransform>(), 0.5f, 1f).setDelay(1f);

    + +
    +
    +
    +
    +

    LeanTween.alphaCanvas

    + +
    + (
      +
    • + rectTransform:RectTransform +
    • +
    • + to:float +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1066 +

    + + + +
    + +
    +

    Fade a Unity UI Canvas Group

    Fade a Unity UI Canvas Group

    + +
    + +
    +

    Parameters:

    + +
      +
    • + rectTransform:RectTransform + RectTransform + + +
      +

      RectTransform that the CanvasGroup is attached to

      + +
      + +
    • +
    • + to:float + Float + + +
      +

      the final alpha value (0-1)

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      The time with which to fade the object

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.alphaCanvas(gameObject.GetComponent<RectTransform>(), 0f, 1f) .setLoopPingPong();

    + +
    +
    +
    +
    +

    LeanTween.alphaText

    + +
    + (
      +
    • + rectTransform:RectTransform +
    • +
    • + to:float +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1048 +

    + + + +
    + +
    +

    Fade a Unity UI Object

    Fade a Unity UI Object

    + +
    + +
    +

    Parameters:

    + +
      +
    • + rectTransform:RectTransform + RectTransform + + +
      +

      RectTransform associated with the Text Component you wish to fade

      + +
      + +
    • +
    • + to:float + Float + + +
      +

      the final alpha value (0-1)

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      The time with which to fade the object

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.alphaText(gameObject.GetComponent<RectTransform>(), 1f, 1f) .setEase(LeanTweenType.easeInCirc);

    + +
    +
    +
    +
    +

    LeanTween.alphaVertex

    + +
    + (
      +
    • + gameObject:GameObject +
    • +
    • + to:float +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1082 +

    + + + +
    + +
    +

    This works by tweening the vertex colors directly.

    This works by tweening the vertex colors directly +
    + Vertex-based coloring is useful because you avoid making a copy of your + object's material for each instance that needs a different color.
    +
    + A shader that supports vertex colors is required for it to work + (for example the shaders in Mobile/Particles/)

    + +
    + +
    +

    Parameters:

    + +
      +
    • + gameObject:GameObject + GameObject + + +
      +

      Gameobject that you wish to alpha

      + +
      + +
    • +
    • + to:float + Float + + +
      +

      The alpha value you wish to tween to

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      The time with which to delay before calling the function

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +
    +

    LeanTween.cancel

    + +
    + (
      +
    • + id:int +
    • +
    • + callOnComplete:int +
    • +
    ) +
    + + + + + + + + +
    +

    + Defined in + LeanTween.cs:571 +

    + + + +
    + +
    +

    Cancel a specific tween with the provided id

    Cancel a specific tween with the provided id

    + +
    + +
    +

    Parameters:

    + +
      +
    • + id:int + Int + + +
      +

      unique id that represents that tween

      + +
      + +
    • +
    • + callOnComplete:int + Bool + + +
      +

      (optional) whether to call the onComplete method before canceling

      + +
      + +
    • +
    +
    + + +
    +

    Example:

    + +
    +

    int id = LeanTween.move( gameObject, new Vector3(0f,1f,2f), 1f).id;
    + LeanTween.cancel( id );

    + +
    +
    +
    +
    +

    LeanTween.cancel

    + +
    + (
      +
    • + gameObject:GameObject +
    • +
    • + callOnComplete:bool +
    • +
    ) +
    + + + + + + + + +
    +

    + Defined in + LeanTween.cs:507 +

    + + + +
    + +
    +

    Cancel all tweens that are currently targeting the gameObject

    Cancel all tweens that are currently targeting the gameObject

    + +
    + +
    +

    Parameters:

    + +
      +
    • + gameObject:GameObject + GameObject + + +
      +

      gameObject whose tweens you wish to cancel

      + +
      + +
    • +
    • + callOnComplete:bool + Bool + + +
      +

      (optional) whether to call the onComplete method before canceling

      + +
      + +
    • +
    +
    + + +
    +

    Example:

    + +
    +

    LeanTween.move( gameObject, new Vector3(0f,1f,2f), 1f);
    + LeanTween.cancel( gameObject );

    + +
    +
    +
    +
    +

    LeanTween.cancelAll

    + +
    + (
      +
    • + callComplete:bool +
    • +
    ) +
    + + + + + + + + +
    +

    + Defined in + LeanTween.cs:485 +

    + + + +
    + +
    +

    Cancels all tweens

    Cancels all tweens

    + +
    + +
    +

    Parameters:

    + +
      +
    • + callComplete:bool + Bool + + +
      +

      (optional) if true, then the all onCompletes will run before canceling

      + +
      + +
    • +
    +
    + + +
    +

    Example:

    + +
    +

    LeanTween.cancelAll(true);

    + +
    +
    +
    +
    +

    LeanTween.color

    + +
    + (
      +
    • + gameObject:GameObject +
    • +
    • + to:Color +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1101 +

    + + + +
    + +
    +

    Change a gameobject's material to a certain color value. The material's shader needs to support color tinting. Owl labs has some excellent efficient shaders.

    Change a gameobject's material to a certain color value

    + +
    + +
    +

    Parameters:

    + +
      +
    • + gameObject:GameObject + GameObject + + +
      +

      Gameobject that you wish to change the color

      + +
      + +
    • +
    • + to:Color + Color + + +
      +

      the final color value ex: Color.Red, new Color(1.0f,1.0f,0.0f,0.8f)

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      The time with which to fade the object

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.color(gameObject, Color.yellow, 1f) .setDelay(1f);

    + +
    +
    +
    +
    +

    LeanTween.colorText

    + +
    + (
      +
    • + rectTransform:RectTransform +
    • +
    • + to:Color +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1122 +

    + + + +
    + +
    +

    Change the color a Unity UI Object

    Change the color a Unity UI Object

    + +
    + +
    +

    Parameters:

    + +
      +
    • + rectTransform:RectTransform + RectTransform + + +
      +

      RectTransform attached to the Text Component whose color you want to change

      + +
      + +
    • +
    • + to:Color + Color + + +
      +

      the final alpha value ex: Color.Red, new Color(1.0f,1.0f,0.0f,0.8f)

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      The time with which to fade the object

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.colorText(gameObject.GetComponent<RectTransform>(), Color.yellow, 1f) .setDelay(1f);

    + +
    +
    +
    +
    +

    LeanTween.delayedCall

    + +
    + (
      +
    • + gameObject:GameObject +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1141 +

    + + + +
    + +
    +

    Call a method after a specified amount of time

    Call a method after a specified amount of time

    + +
    + +
    +

    Parameters:

    + +
      +
    • + gameObject:GameObject + GameObject + + +
      +

      Gameobject that you wish to associate with this delayed call

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      delay The time you wish to pass before the method is called

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.delayedCall(gameObject, 1f, ()=>{
    Debug.Log("I am called one second later!");
    }));

    + +
    +
    +
    +
    +

    LeanTween.descr

    + +
    + (
      +
    • + id:int +
    • +
    ) +
    + + + + + + + + +
    +

    + Defined in + LeanTween.cs:612 +

    + + + +
    + +
    +

    Retrieve a tweens LTDescr object to modify

    Retrieve a tweens LTDescr object to modify

    + +
    + +
    +

    Parameters:

    + +
      +
    • + id:int + Int + + +
      +

      unique id that represents that tween

      + +
      + +
    • +
    +
    + + +
    +

    Example:

    + +
    +

    int id = LeanTween.move( gameObject, new Vector3(0f,1f,2f), 1f).setOnComplete( oldMethod ).id;

    +
    // later I want decide I want to change onComplete method
    + LTDescr descr = LeanTween.descr( id );
    + if(descr!=null) // if the tween has already finished it will come back null
    +   descr.setOnComplete( newMethod );
    +
    +
    +
    +
    +

    LeanTween.descriptions

    + +
    + (
      +
    • + id:GameObject +
    • +
    ) +
    + + + + + + + + +
    +

    + Defined in + LeanTween.cs:646 +

    + + + +
    + +
    +

    Retrieve a tweens LTDescr object(s) to modify

    Retrieve a tweens LTDescr object(s) to modifyn

    + +
    + +
    +

    Parameters:

    + +
      +
    • + id:GameObject + GameObject + + +
      +

      object whose tween descriptions you want to retrieve

      + +
      + +
    • +
    +
    + + +
    +

    Example:

    + +
    +

    LeanTween.move( gameObject, new Vector3(0f,1f,2f), 1f).setOnComplete( oldMethod );

    +
    // later I want decide I want to change onComplete method
    + LTDescr[] descr = LeanTween.descriptions( gameObject );
    + if(descr.Length>0) // make sure there is a valid description for this target
    +   descr[0].setOnComplete( newMethod );// in this case we only ever expect there to be one tween on this object
    +
    +
    +
    +
    +

    LeanTween.dispatchEvent

    + +
    + (
      +
    • + eventId:int +
    • +
    ) +
    + + + + + + + + +
    +

    + Defined in + LeanTween.cs:2475 +

    + + + +
    + +
    +

    Tell the added listeners that you are dispatching the event

    + +
    + +
    +

    Parameters:

    + +
      +
    • + eventId:int + Int + + +
      +

      a unique int that describes the event (best to use an enum)

      + +
      + +
    • +
    +
    + + +
    +

    Example:

    + +
    +

    LeanTween.dispatchEvent( (int)MyEvents.JUMP );

    + +
    +
    +
    +
    +

    LeanTween.dispatchEvent

    + +
    + (
      +
    • + eventId:int +
    • +
    • + data:object +
    • +
    ) +
    + + + + + + + + +
    +

    + Defined in + LeanTween.cs:2486 +

    + + + +
    + +
    +

    Tell the added listeners that you are dispatching the event

    + +
    + +
    +

    Parameters:

    + +
      +
    • + eventId:int + Int + + +
      +

      a unique int that describes the event (best to use an enum)

      + +
      + +
    • +
    • + data:object + Object + + +
      +

      Pass data to the listener, access it from the listener with *.data on the LTEvent object

      + +
      + +
    • +
    +
    + + +
    +

    Example:

    + +
    +

    LeanTween.dispatchEvent( (int)MyEvents.JUMP, transform );
    +
    + void jumpUp( LTEvent e ){
    +   Transform tran = (Transform)e.data;
    + }

    + +
    +
    +
    +
    +

    LeanTween.init

    + +
    + (
      +
    • + maxSimultaneousTweens:int +
    • +
    ) +
    + + + + + + + + +
    +

    + Defined in + LeanTween.cs:293 +

    + + + +
    + +
    +

    This line is optional. Here you can specify the maximum number of tweens you will use (the default is 400). This must be called before any use of LeanTween is made for it to be effective.

    This line is optional. Here you can specify the maximum number of tweens you will use (the default is 400). This must be called before any use of LeanTween is made for it to be effective.

    + +
    + +
    +

    Parameters:

    + +
      +
    • + maxSimultaneousTweens:int + Integer + + +
      +

      The maximum number of tweens you will use, make sure you don't go over this limit, otherwise the code will throw an error

      + +
      + +
    • +
    +
    + + +
    +

    Example:

    + +
    +

    LeanTween.init( 800 );

    + +
    +
    +
    +
    +

    LeanTween.isTweening

    + +
    + (
      +
    • + gameObject:GameObject +
    • +
    ) +
    + + + + + + + + +
    +

    + Defined in + LeanTween.cs:770 +

    + + + +
    + +
    +

    Test whether or not a tween is active on a GameObject

    Test whether or not a tween is active on a GameObject

    + +
    + +
    +

    Parameters:

    + +
      +
    • + gameObject:GameObject + GameObject + + +
      +

      GameObject that you want to test if it is tweening

      + +
      + +
    • +
    +
    + + +
    +
    +

    LeanTween.isTweening

    + +
    + (
      +
    • + id:int +
    • +
    ) +
    + + + + + + + + +
    +

    + Defined in + LeanTween.cs:796 +

    + + + +
    + +
    +

    Test whether or not a tween is active or not

    Test whether or not a tween is active or not

    + +
    + +
    +

    Parameters:

    + +
      +
    • + id:int + GameObject + + +
      +

      id of the tween that you want to test if it is tweening

      + +
      + +
    • +
    +
    + + +
    +

    Example:

    + +
    +

    int id = LeanTween.moveX(gameObject, 1f, 3f).id;
    + if(LeanTween.isTweening( id ))
    +      Debug.Log("I am tweening!");

    + +
    +
    +
    +
    +

    LeanTween.move

    + +
    + (
      +
    • + gameObject:GameObject +
    • +
    • + destination:Transform +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1412 +

    + + + +
    + +
    +

    Move a GameObject to another transform

    Move a GameObject to another transform

    + +
    + +
    +

    Parameters:

    + +
      +
    • + gameObject:GameObject + GameObject + + +
      +

      Gameobject that you wish to move

      + +
      + +
    • +
    • + destination:Transform + Transform + + +
      +

      Transform whose position the tween will finally end on

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      time The time to complete the tween in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.move(gameObject, anotherTransform, 2.0f) .setEase( LeanTweenType.easeOutQuad );

    + +
    +
    +
    +
    +

    LeanTween.move

    + +
    + (
      +
    • + gameObject:GameObject +
    • +
    • + vec:Vector3 +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1175 +

    + + + +
    + +
    +

    Move a GameObject to a certain location

    Move a GameObject to a certain location

    + +
    + +
    +

    Parameters:

    + +
      +
    • + gameObject:GameObject + GameObject + + +
      +

      Gameobject that you wish to move

      + +
      + +
    • +
    • + vec:Vector3 + Vector3 + + +
      +

      to The final positin with which to move to

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      time The time to complete the tween in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.move(gameObject, new Vector3(0f,-3f,5f), 2.0f) .setEase( LeanTweenType.easeOutQuad );

    + +
    +
    +
    +
    +

    LeanTween.move

    + +
    + (
      +
    • + gameObject:GameObject +
    • +
    • + path:Vector3[] +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1193 +

    + + + +
    + +
    +

    Move a GameObject along a set of bezier curves

    Move a GameObject along a set of bezier curves

    + +
    + +
    +

    Parameters:

    + +
      +
    • + gameObject:GameObject + GameObject + + +
      +

      Gameobject that you wish to move

      + +
      + +
    • +
    • + path:Vector3[] + Vector3 + + +
      +

      A set of points that define the curve(s) ex: Point1,Handle2,Handle1,Point2,...

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      The time to complete the tween in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    Javascript:
    + LeanTween.move(gameObject, [Vector3(0,0,0),Vector3(1,0,0),Vector3(1,0,0),Vector3(1,0,1)], 2.0) .setEase(LeanTweenType.easeOutQuad).setOrientToPath(true);

    + C#:
    + LeanTween.move(gameObject, new Vector3[]{new Vector3(0f,0f,0f),new Vector3(1f,0f,0f),new Vector3(1f,0f,0f),new Vector3(1f,0f,1f)}, 1.5f).setEase(LeanTweenType.easeOutQuad).setOrientToPath(true);;

    + +
    +
    +
    +
    +

    LeanTween.move (GUI)

    + +
    + (
      +
    • + ltRect:LTRect +
    • +
    • + vec:Vector2 +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1294 +

    + + + +
    + +
    +

    Move a GUI Element to a certain location

    Move a GUI Element to a certain location

    + +
    + +
    +

    Parameters:

    + +
      +
    • + ltRect:LTRect + LTRect + + +
      +

      ltRect LTRect object that you wish to move

      + +
      + +
    • +
    • + vec:Vector2 + Vector2 + + +
      +

      to The final position with which to move to (pixel coordinates)

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      time The time to complete the tween in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +
    +

    LeanTween.move (RectTransform)

    + +
    + (
      +
    • + rectTrans:RectTransform +
    • +
    • + to:Vector3 +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1876 +

    + + + +
    + +
    +

    Move a RectTransform object (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...)

    Move a RectTransform object (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...)

    + +
    + +
    +

    Parameters:

    + +
      +
    • + rectTrans:RectTransform + RectTransform + + +
      +

      RectTransform that you wish to attach the tween to

      + +
      + +
    • +
    • + to:Vector3 + Vector3 + + +
      +

      The final Vector3 with which to tween to

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      The time to complete the tween in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.move(gameObject.GetComponent<RectTransform>(), new Vector3(200f,-100f,0f), 1f).setDelay(1f);

    + +
    +
    +
    +
    +

    LeanTween.moveLocal

    + +
    + (
      +
    • + gameObject:GameObject +
    • +
    • + path:Vector3[] +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1363 +

    + + + +
    + +
    +

    Move a GameObject along a set of bezier curves, in local space

    Move a GameObject along a set of bezier curves, in local space

    + +
    + +
    +

    Parameters:

    + +
      +
    • + gameObject:GameObject + GameObject + + +
      +

      Gameobject that you wish to move

      + +
      + +
    • +
    • + path:Vector3[] + Vector3 + + +
      +

      A set of points that define the curve(s) ex: Point1,Handle1,Handle2,Point2,...

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      The time to complete the tween in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    Javascript:
    + LeanTween.moveLocal(gameObject, [Vector3(0,0,0),Vector3(1,0,0),Vector3(1,0,0),Vector3(1,0,1)], 2.0).setEase(LeanTweenType.easeOutQuad).setOrientToPath(true);

    + C#:
    + LeanTween.moveLocal(gameObject, new Vector3[]{Vector3(0f,0f,0f),Vector3(1f,0f,0f),Vector3(1f,0f,0f),Vector3(1f,0f,1f)}).setEase(LeanTweenType.easeOutQuad).setOrientToPath(true);

    + +
    +
    +
    +
    +

    LeanTween.moveLocal

    + +
    + (
      +
    • + GameObject +
    • +
    • + Vector3 +
    • +
    • + float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1350 +

    + + + +
    + +
    +

    Move a GameObject to a certain location relative to the parent transform.

    Move a GameObject to a certain location relative to the parent transform.

    + +
    + +
    +

    Parameters:

    + +
      +
    • + GameObject + GameObject + + +
      +

      gameObject Gameobject that you wish to rotate

      + +
      + +
    • +
    • + Vector3 + Vector3 + + +
      +

      to The final positin with which to move to

      + +
      + +
    • +
    • + float + Float + + +
      +

      time The time to complete the tween in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +
    +

    LeanTween.moveSpline

    + +
    + (
      +
    • + gameObject:GameObject +
    • +
    • + spline:LTSpline +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1252 +

    + + + +
    + +
    +

    Move a GameObject through a set of points

    Move a GameObject through a set of points

    + +
    + +
    +

    Parameters:

    + +
      +
    • + gameObject:GameObject + GameObject + + +
      +

      Gameobject that you wish to move

      + +
      + +
    • +
    • + spline:LTSpline + LTSpline + + +
      +

      pass a pre-existing LTSpline for the object to move along

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      The time to complete the tween in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    Javascript:
    + LeanTween.moveSpline(gameObject, ltSpline, 2.0) .setEase(LeanTweenType.easeOutQuad).setOrientToPath(true);

    + C#:
    + LeanTween.moveSpline(gameObject, ltSpline, 1.5f).setEase(LeanTweenType.easeOutQuad).setOrientToPath(true);

    + +
    +
    +
    +
    +

    LeanTween.moveSpline

    + +
    + (
      +
    • + gameObject:GameObject +
    • +
    • + path:Vector3[] +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1231 +

    + + + +
    + +
    +

    Move a GameObject through a set of points

    Move a GameObject through a set of points

    + +
    + +
    +

    Parameters:

    + +
      +
    • + gameObject:GameObject + GameObject + + +
      +

      Gameobject that you wish to move

      + +
      + +
    • +
    • + path:Vector3[] + Vector3 + + +
      +

      A set of points that define the curve(s) ex: ControlStart,Pt1,Pt2,Pt3,.. ..ControlEnd
      Note: The first and last item just define the angle of the end points, they are not actually used in the spline path itself. If you do not care about the angle you can jus set the first two items and last two items as the same value.

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      The time to complete the tween in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    Javascript:
    + LeanTween.moveSpline(gameObject, [Vector3(0,0,0),Vector3(1,0,0),Vector3(1,0,0),Vector3(1,0,1)], 2.0) .setEase(LeanTweenType.easeOutQuad).setOrientToPath(true);

    + C#:
    + LeanTween.moveSpline(gameObject, new Vector3[]{new Vector3(0f,0f,0f),new Vector3(1f,0f,0f),new Vector3(1f,0f,0f),new Vector3(1f,0f,1f)}, 1.5f).setEase(LeanTweenType.easeOutQuad).setOrientToPath(true);

    + +
    +
    +
    +
    +

    LeanTween.moveSplineLocal

    + +
    + (
      +
    • + gameObject:GameObject +
    • +
    • + path:Vector3[] +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1273 +

    + + + +
    + +
    +

    Move a GameObject through a set of points, in local space

    Move a GameObject through a set of points, in local space

    + +
    + +
    +

    Parameters:

    + +
      +
    • + gameObject:GameObject + GameObject + + +
      +

      Gameobject that you wish to move

      + +
      + +
    • +
    • + path:Vector3[] + Vector3 + + +
      +

      A set of points that define the curve(s) ex: ControlStart,Pt1,Pt2,Pt3,.. ..ControlEnd

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      The time to complete the tween in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    Javascript:
    + LeanTween.moveSpline(gameObject, [Vector3(0,0,0),Vector3(1,0,0),Vector3(1,0,0),Vector3(1,0,1)], 2.0) .setEase(LeanTweenType.easeOutQuad).setOrientToPath(true);

    + C#:
    + LeanTween.moveSpline(gameObject, new Vector3[]{new Vector3(0f,0f,0f),new Vector3(1f,0f,0f),new Vector3(1f,0f,0f),new Vector3(1f,0f,1f)}, 1.5f).setEase(LeanTweenType.easeOutQuad).setOrientToPath(true);

    + +
    +
    +
    +
    +

    LeanTween.moveX

    + +
    + (
      +
    • + gameObject:GameObject +
    • +
    • + to:float +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1311 +

    + + + +
    + +
    +

    Move a GameObject along the x-axis

    Move a GameObject along the x-axis

    + +
    + +
    +

    Parameters:

    + +
      +
    • + gameObject:GameObject + GameObject + + +
      +

      gameObject Gameobject that you wish to move

      + +
      + +
    • +
    • + to:float + Float + + +
      +

      to The final position with which to move to

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      time The time to complete the move in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +
    +

    LeanTween.moveX (RectTransform)

    + +
    + (
      +
    • + rectTrans:RectTransform +
    • +
    • + to:float +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1890 +

    + + + +
    + +
    +

    Move a RectTransform object affecting x-axis only (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...)

    Move a RectTransform object affecting x-axis only (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...)

    + +
    + +
    +

    Parameters:

    + +
      +
    • + rectTrans:RectTransform + RectTransform + + +
      +

      RectTransform that you wish to attach the tween to

      + +
      + +
    • +
    • + to:float + Float + + +
      +

      The final x location with which to tween to

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      The time to complete the tween in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.moveX(gameObject.GetComponent<RectTransform>(), 200f, 1f).setDelay(1f);

    + +
    +
    +
    +
    +

    LeanTween.moveY

    + +
    + (
      +
    • + GameObject +
    • +
    • + float +
    • +
    • + float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1324 +

    + + + +
    + +
    +

    Move a GameObject along the y-axis

    Move a GameObject along the y-axis

    + +
    + +
    +

    Parameters:

    + +
      +
    • + GameObject + GameObject + + +
      +

      gameObject Gameobject that you wish to move

      + +
      + +
    • +
    • + float + Float + + +
      +

      to The final position with which to move to

      + +
      + +
    • +
    • + float + Float + + +
      +

      time The time to complete the move in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +
    +

    LeanTween.moveY (RectTransform)

    + +
    + (
      +
    • + rectTrans:RectTransform +
    • +
    • + to:float +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1904 +

    + + + +
    + +
    +

    Move a RectTransform object affecting y-axis only (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...)

    Move a RectTransform object affecting y-axis only (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...)

    + +
    + +
    +

    Parameters:

    + +
      +
    • + rectTrans:RectTransform + RectTransform + + +
      +

      RectTransform that you wish to attach the tween to

      + +
      + +
    • +
    • + to:float + Float + + +
      +

      The final y location with which to tween to

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      The time to complete the tween in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.moveY(gameObject.GetComponent<RectTransform>(), 200f, 1f).setDelay(1f);

    + +
    +
    +
    +
    +

    LeanTween.moveZ

    + +
    + (
      +
    • + GameObject +
    • +
    • + float +
    • +
    • + float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1337 +

    + + + +
    + +
    +

    Move a GameObject along the z-axis

    Move a GameObject along the z-axis

    + +
    + +
    +

    Parameters:

    + +
      +
    • + GameObject + GameObject + + +
      +

      gameObject Gameobject that you wish to move

      + +
      + +
    • +
    • + float + Float + + +
      +

      to The final position with which to move to

      + +
      + +
    • +
    • + float + Float + + +
      +

      time The time to complete the move in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +
    +

    LeanTween.moveZ (RectTransform)

    + +
    + (
      +
    • + rectTrans:RectTransform +
    • +
    • + to:float +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1918 +

    + + + +
    + +
    +

    Move a RectTransform object affecting z-axis only (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...)

    Move a RectTransform object affecting z-axis only (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...)n

    + +
    + +
    +

    Parameters:

    + +
      +
    • + rectTrans:RectTransform + RectTransform + + +
      +

      RectTransform that you wish to attach the tween to

      + +
      + +
    • +
    • + to:float + Float + + +
      +

      The final x location with which to tween to

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      The time to complete the tween in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.moveZ(gameObject.GetComponent<RectTransform>(), 200f, 1f).setDelay(1f);

    + +
    +
    +
    +
    +

    LeanTween.pause

    + +
    + (
      +
    • + gameObject:GameObject +
    • +
    ) +
    + + + + + + + + +
    +

    + Defined in + LeanTween.cs:693 +

    + + + +
    + +
    +

    Pause all tweens for a GameObject

    Pause all tweens for a GameObject

    + +
    + +
    +

    Parameters:

    + +
      +
    • + gameObject:GameObject + GameObject + + +
      +

      GameObject whose tweens you want to pause

      + +
      + +
    • +
    +
    + + +
    +
    +

    LeanTween.pause

    + +
    + (
      +
    • + id:int +
    • +
    ) +
    + + + + + + + + +
    +

    + Defined in + LeanTween.cs:674 +

    + + + +
    + +
    +

    Pause all tweens for a GameObject

    Pause all tweens for a GameObject

    + +
    + +
    +

    Parameters:

    + +
      +
    • + id:int + Int + + +
      +

      Id of the tween you want to pause

      + +
      + +
    • +
    +
    + + +
    +

    Example:

    + +
    +

    int id = LeanTween.moveX(gameObject, 5, 1.0).id
    + LeanTween.pause( id );
    + // Later....
    + LeanTween.resume( id );

    + +
    +
    +
    +
    +

    LeanTween.pauseAll

    + + () + + + + + + + + +
    +

    + Defined in + LeanTween.cs:708 +

    + + + +
    + +
    +

    Pause all active tweens

    Pause all active tweens

    + +
    + + + +
    +
    +

    LeanTween.play

    + +
    + (
      +
    • + rectTransform:RectTransform +
    • +
    • + sprites:Sprite[] +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:949 +

    + + + +
    + +
    +

    Play a sequence of images on a Unity UI Object

    Play a sequence of images on a Unity UI Object

    + +
    + +
    +

    Parameters:

    + +
      +
    • + rectTransform:RectTransform + RectTransform + + +
      +

      RectTransform that you want to play the sequence of sprites on

      + +
      + +
    • +
    • + sprites:Sprite[] + Sprite + + +
      +

      Sequence of sprites to be played

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.play(gameObject.GetComponent<RectTransform>(), sprites).setLoopPingPong();

    + +
    +
    +
    +
    +

    LeanTween.removeListener

    + +
    + (
      +
    • + caller:GameObject +
    • +
    • + eventId:int +
    • +
    • + callback:System.Action<LTEvent> +
    • +
    ) +
    + + + + + + + + +
    +

    + Defined in + LeanTween.cs:2448 +

    + + + +
    + +
    +

    Remove an event listener you have added

    + +
    + +
    +

    Parameters:

    + +
      +
    • + caller:GameObject + GameObject + + +
      +

      the gameObject the listener is attached to

      + +
      + +
    • +
    • + eventId:int + Int + + +
      +

      a unique int that describes the event (best to use an enum)

      + +
      + +
    • +
    • + callback:System.Action<LTEvent> + System.Action + + +
      +

      the method that was specified to call when the event has been dispatched

      + +
      + +
    • +
    +
    + + +
    +

    Example:

    + +
    +

    LeanTween.removeListener(gameObject, (int)MyEvents.JUMP, jumpUp);
    +
    + void jumpUp( LTEvent e ){ }

    + +
    +
    +
    +
    +

    LeanTween.resume

    + +
    + (
      +
    • + id:int +
    • +
    ) +
    + + + + + + + + +
    +

    + Defined in + LeanTween.cs:737 +

    + + + +
    + +
    +

    Resume a specific tween

    Resume a specific tween

    + +
    + +
    +

    Parameters:

    + +
      +
    • + id:int + Int + + +
      +

      Id of the tween you want to resume

      + +
      + +
    • +
    +
    + + +
    +

    Example:

    + +
    +

    int id = LeanTween.moveX(gameObject, 5, 1.0).id
    + LeanTween.pause( id );
    + // Later....
    + LeanTween.resume( id );

    + +
    +
    +
    +
    +

    LeanTween.resume

    + +
    + (
      +
    • + gameObject:GameObject +
    • +
    ) +
    + + + + + + + + +
    +

    + Defined in + LeanTween.cs:756 +

    + + + +
    + +
    +

    Resume all the tweens on a GameObject

    Resume all the tweens on a GameObject

    + +
    + +
    +

    Parameters:

    + +
      +
    • + gameObject:GameObject + GameObject + + +
      +

      GameObject whose tweens you want to resume

      + +
      + +
    • +
    +
    + + +
    +
    +

    LeanTween.resumeAll

    + + () + + + + + + + + +
    +

    + Defined in + LeanTween.cs:720 +

    + + + +
    + +
    +

    Resume all active tweens

    Resume all active tweens

    + +
    + + + +
    +
    +

    LeanTween.rotate

    + +
    + (
      +
    • + GameObject +
    • +
    • + Vector3 +
    • +
    • + float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1426 +

    + + + +
    + +
    +

    Rotate a GameObject, to values are in passed in degrees

    Rotate a GameObject, to values are in passed in degrees

    + +
    + +
    +

    Parameters:

    + +
      +
    • + GameObject + GameObject + + +
      +

      gameObject Gameobject that you wish to rotate

      + +
      + +
    • +
    • + Vector3 + Vector3 + + +
      +

      to The final rotation with which to rotate to

      + +
      + +
    • +
    • + float + Float + + +
      +

      time The time to complete the tween in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.rotate(cube, new Vector3(180f,30f,0f), 1.5f);

    + +
    +
    +
    +
    +

    LeanTween.rotate

    + +
    + (
      +
    • + ltRect:LTRect +
    • +
    • + to:float +
    • +
    • + time:float +
    • +
    • + optional:Array +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1441 +

    + + + +
    + +
    +

    Rotate a GUI element (using an LTRect object), to a value that is in degrees

    Rotate a GUI element (using an LTRect object), to a value that is in degrees

    + +
    + +
    +

    Parameters:

    + +
      +
    • + ltRect:LTRect + LTRect + + +
      +

      LTRect that you wish to rotate

      + +
      + +
    • +
    • + to:float + Float + + +
      +

      The final rotation with which to rotate to

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      The time to complete the tween in

      + +
      + +
    • +
    • + optional:Array + Array + + +
      +

      Object Array where you can pass optional items.

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    if(GUI.Button(buttonRect.rect, "Rotate"))
    + LeanTween.rotate( buttonRect4, 150.0f, 1.0f).setEase(LeanTweenType.easeOutElastic);
    + GUI.matrix = Matrix4x4.identity;

    + +
    +
    +
    +
    +

    LeanTween.rotate (RectTransform)

    + +
    + (
      +
    • + rectTrans:RectTransform +
    • +
    • + to:float +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1932 +

    + + + +
    + +
    +

    Rotate a RectTransform object (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...)

    Rotate a RectTransform object (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...)

    + +
    + +
    +

    Parameters:

    + +
      +
    • + rectTrans:RectTransform + RectTransform + + +
      +

      RectTransform that you wish to attach the tween to

      + +
      + +
    • +
    • + to:float + Float + + +
      +

      The degree with which to rotate the RectTransform

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      The time to complete the tween in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.rotate(gameObject.GetComponent<RectTransform>(), 90f, 1f).setDelay(1f);

    + +
    +
    +
    +
    +

    LeanTween.rotateAround

    + +
    + (
      +
    • + gameObject:GameObject +
    • +
    • + vec:Vector3 +
    • +
    • + degrees:float +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1511 +

    + + + +
    + +
    +

    Rotate a GameObject around a certain Axis (the best method to use when you want to rotate beyond 180 degrees)

    Rotate a GameObject around a certain Axis (the best method to use when you want to rotate beyond 180 degrees)

    + +
    + +
    +

    Parameters:

    + +
      +
    • + gameObject:GameObject + GameObject + + +
      +

      Gameobject that you wish to rotate

      + +
      + +
    • +
    • + vec:Vector3 + Vector3 + + +
      +

      axis in which to rotate around ex: Vector3.up

      + +
      + +
    • +
    • + degrees:float + Float + + +
      +

      the degrees in which to rotate

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      time The time to complete the rotation in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    Example:
    + LeanTween.rotateAround ( gameObject, Vector3.left, 90f, 1f );

    + +
    +
    +
    +
    +

    LeanTween.rotateAround (RectTransform)

    + +
    + (
      +
    • + rectTrans:RectTransform +
    • +
    • + axis:Vector3 +
    • +
    • + to:float +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1950 +

    + + + +
    + +
    +

    Rotate a RectTransform object (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...)

    Rotate a RectTransform object (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...)

    + +
    + +
    +

    Parameters:

    + +
      +
    • + rectTrans:RectTransform + RectTransform + + +
      +

      RectTransform that you wish to attach the tween to

      + +
      + +
    • +
    • + axis:Vector3 + Vector3 + + +
      +

      The axis in which to rotate the RectTransform (Vector3.forward is most commonly used)

      + +
      + +
    • +
    • + to:float + Float + + +
      +

      The degree with which to rotate the RectTransform

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      The time to complete the tween in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.rotateAround(gameObject.GetComponent<RectTransform>(), Vector3.forward, 90f, 1f).setDelay(1f);

    + +
    +
    +
    +
    +

    LeanTween.rotateAroundLocal

    + +
    + (
      +
    • + gameObject:GameObject +
    • +
    • + vec:Vector3 +
    • +
    • + degrees:float +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1528 +

    + + + +
    + +
    +

    Rotate a GameObject around a certain Axis in Local Space (the best method to use when you want to rotate beyond 180 degrees)

    Rotate a GameObject around a certain Axis in Local Space (the best method to use when you want to rotate beyond 180 degrees)

    + +
    + +
    +

    Parameters:

    + +
      +
    • + gameObject:GameObject + GameObject + + +
      +

      Gameobject that you wish to rotate

      + +
      + +
    • +
    • + vec:Vector3 + Vector3 + + +
      +

      axis in which to rotate around ex: Vector3.up

      + +
      + +
    • +
    • + degrees:float + Float + + +
      +

      the degrees in which to rotate

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      time The time to complete the rotation in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    Example:
    + LeanTween.rotateAround ( gameObject, Vector3.left, 90f, 1f );

    + +
    +
    +
    +
    +

    LeanTween.rotateAroundLocal (RectTransform)

    + +
    + (
      +
    • + rectTrans:RectTransform +
    • +
    • + axis:Vector3 +
    • +
    • + to:float +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1965 +

    + + + +
    + +
    +

    Rotate a RectTransform object around it's local axis (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...)

    Rotate a RectTransform object around it's local axis (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...)

    + +
    + +
    +

    Parameters:

    + +
      +
    • + rectTrans:RectTransform + RectTransform + + +
      +

      RectTransform that you wish to attach the tween to

      + +
      + +
    • +
    • + axis:Vector3 + Vector3 + + +
      +

      The local axis in which to rotate the RectTransform (Vector3.forward is most commonly used)

      + +
      + +
    • +
    • + to:float + Float + + +
      +

      The degree with which to rotate the RectTransform

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      The time to complete the tween in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.rotateAroundLocal(gameObject.GetComponent<RectTransform>(), Vector3.forward, 90f, 1f).setDelay(1f);

    + +
    +
    +
    +
    +

    LeanTween.rotateLocal

    + +
    + (
      +
    • + gameObject:GameObject +
    • +
    • + to:Vector3 +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1459 +

    + + + +
    + +
    +

    Rotate a GameObject in the objects local space (on the transforms localEulerAngles object)

    Rotate a GameObject in the objects local space (on the transforms localEulerAngles object)

    + +
    + +
    +

    Parameters:

    + +
      +
    • + gameObject:GameObject + GameObject + + +
      +

      Gameobject that you wish to rotate

      + +
      + +
    • +
    • + to:Vector3 + Vector3 + + +
      +

      The final rotation with which to rotate to

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      The time to complete the rotation in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +
    +

    LeanTween.rotateX

    + +
    + (
      +
    • + GameObject +
    • +
    • + to:float +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1472 +

    + + + +
    + +
    +

    Rotate a GameObject only on the X axis

    Rotate a GameObject only on the X axis

    + +
    + +
    +

    Parameters:

    + +
      +
    • + GameObject + GameObject + + +
      +

      Gameobject that you wish to rotate

      + +
      + +
    • +
    • + to:float + Float + + +
      +

      The final x-axis rotation with which to rotate

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      The time to complete the rotation in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +
    +

    LeanTween.rotateY

    + +
    + (
      +
    • + GameObject +
    • +
    • + to:float +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1485 +

    + + + +
    + +
    +

    Rotate a GameObject only on the Y axis

    Rotate a GameObject only on the Y axis

    + +
    + +
    +

    Parameters:

    + +
      +
    • + GameObject + GameObject + + +
      +

      Gameobject that you wish to rotate

      + +
      + +
    • +
    • + to:float + Float + + +
      +

      The final y-axis rotation with which to rotate

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      The time to complete the rotation in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +
    +

    LeanTween.rotateZ

    + +
    + (
      +
    • + GameObject +
    • +
    • + to:float +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1498 +

    + + + +
    + +
    +

    Rotate a GameObject only on the Z axis

    Rotate a GameObject only on the Z axis

    + +
    + +
    +

    Parameters:

    + +
      +
    • + GameObject + GameObject + + +
      +

      Gameobject that you wish to rotate

      + +
      + +
    • +
    • + to:float + Float + + +
      +

      The final z-axis rotation with which to rotate

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      The time to complete the rotation in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +
    +

    LeanTween.scale

    + +
    + (
      +
    • + gameObject:GameObject +
    • +
    • + vec:Vector3 +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1545 +

    + + + +
    + +
    +

    Scale a GameObject to a certain size

    Scale a GameObject to a certain size

    + +
    + +
    +

    Parameters:

    + +
      +
    • + gameObject:GameObject + GameObject + + +
      +

      gameObject Gameobject that you wish to scale

      + +
      + +
    • +
    • + vec:Vector3 + Vector3 + + +
      +

      to The size with which to tween to

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      time The time to complete the tween in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +
    +

    LeanTween.scale (GUI)

    + +
    + (
      +
    • + LTRect +
    • +
    • + Vector2 +
    • +
    • + float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1558 +

    + + + +
    + +
    +

    Scale a GUI Element to a certain width and height

    Scale a GUI Element to a certain width and height

    + +
    + +
    +

    Parameters:

    + +
      +
    • + LTRect + LTRect + + +
      +

      ltRect LTRect object that you wish to move

      + +
      + +
    • +
    • + Vector2 + Vector2 + + +
      +

      to The final width and height to scale to (pixel based)

      + +
      + +
    • +
    • + float + Float + + +
      +

      time The time to complete the tween in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    Example Javascript:
    + var bRect:LTRect = new LTRect( 0, 0, 100, 50 );
    + LeanTween.scale( bRect, Vector2(bRect.rect.width, bRect.rect.height) * 1.3, 0.25 ).setEase(LeanTweenType.easeOutBounce);
    + function OnGUI(){
    +   if(GUI.Button(bRect.rect, "Scale")){ }
    + }
    +
    + Example C#:
    + LTRect bRect = new LTRect( 0f, 0f, 100f, 50f );
    + LeanTween.scale( bRect, new Vector2(150f,75f), 0.25f ).setEase(LeanTweenType.easeOutBounce);
    + void OnGUI(){
    +   if(GUI.Button(bRect.rect, "Scale")){ }
    + }

    + +
    +
    +
    +
    +

    LeanTween.scale (RectTransform)

    + +
    + (
      +
    • + rectTrans:RectTransform +
    • +
    • + to:Vector3 +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1980 +

    + + + +
    + +
    +

    Scale a RectTransform object (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...)

    Scale a RectTransform object (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...)

    + +
    + +
    +

    Parameters:

    + +
      +
    • + rectTrans:RectTransform + RectTransform + + +
      +

      RectTransform that you wish to attach the tween to

      + +
      + +
    • +
    • + to:Vector3 + Vector3 + + +
      +

      The final Vector3 with which to tween to (localScale)

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      The time to complete the tween in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.scale(gameObject.GetComponent<RectTransform>(), gameObject.GetComponent<RectTransform>().localScale*2f, 1f).setDelay(1f);

    + +
    +
    +
    +
    +

    LeanTween.scaleX

    + +
    + (
      +
    • + gameObject:GameObject +
    • +
    • + scaleTo:float +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1585 +

    + + + +
    + +
    +

    Scale a GameObject to a certain size along the x-axis only

    Scale a GameObject to a certain size along the x-axis only

    + +
    + +
    +

    Parameters:

    + +
      +
    • + gameObject:GameObject + GameObject + + +
      +

      Gameobject that you wish to scale

      + +
      + +
    • +
    • + scaleTo:float + Float + + +
      +

      the size with which to scale to

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      the time to complete the tween in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +
    +

    LeanTween.scaleY

    + +
    + (
      +
    • + gameObject:GameObject +
    • +
    • + scaleTo:float +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1598 +

    + + + +
    + +
    +

    Scale a GameObject to a certain size along the y-axis only

    Scale a GameObject to a certain size along the y-axis only

    + +
    + +
    +

    Parameters:

    + +
      +
    • + gameObject:GameObject + GameObject + + +
      +

      Gameobject that you wish to scale

      + +
      + +
    • +
    • + scaleTo:float + Float + + +
      +

      the size with which to scale to

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      the time to complete the tween in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +
    +

    LeanTween.scaleZ

    + +
    + (
      +
    • + gameObject:GameObject +
    • +
    • + scaleTo:float +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1611 +

    + + + +
    + +
    +

    Scale a GameObject to a certain size along the z-axis only

    Scale a GameObject to a certain size along the z-axis only

    + +
    + +
    +

    Parameters:

    + +
      +
    • + gameObject:GameObject + GameObject + + +
      +

      Gameobject that you wish to scale

      + +
      + +
    • +
    • + scaleTo:float + Float + + +
      +

      the size with which to scale to

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      the time to complete the tween in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +
    +

    LeanTween.sequence

    + + () + + + LTSeq + + + + + + + + +
    +

    + Defined in + LeanTween.cs:987 +

    + + + +
    + +
    +

    Retrieve a sequencer object where you can easily chain together tweens and methods one after another

    Retrieve a sequencer object where you can easily chain together tweens and methods one after another

    + +
    + + +
    +

    Returns:

    + +
    + LTSeq: +

    LTSeq an object that you can add tweens, methods and time on to

    + +
    +
    + +
    +

    Example:

    + +
    +

    var seq = LeanTween.sequence();
    + seq.add(1f); // delay everything one second
    + seq.add( () => { // fire an event before start
    +  Debug.Log("I have started");
    + });
    + seq.add( LeanTween.move(cube1, Vector3.one * 10f, 1f) ); // do a tween
    + seq.add( () => { // fire event after tween
    +  Debug.Log("We are done now");
    + });;

    + +
    +
    +
    +
    +

    LeanTween.size (RectTransform)

    + +
    + (
      +
    • + rectTrans:RectTransform +
    • +
    • + to:Vector2 +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1994 +

    + + + +
    + +
    +

    Change the sizeDelta of a RectTransform object (used in Unity Canvas, for Buttons, Panel, Scrollbar, etc...)

    Change the sizeDelta of a RectTransform object (used in Unity Canvas, for Buttons, Panel, Scrollbar, etc...)

    + +
    + +
    +

    Parameters:

    + +
      +
    • + rectTrans:RectTransform + RectTransform + + +
      +

      RectTransform that you wish to attach the tween to

      + +
      + +
    • +
    • + to:Vector2 + Vector2 + + +
      +

      The final Vector2 the tween will end at for sizeDelta property

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      The time to complete the tween in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    LeanTween.size(gameObject.GetComponent<RectTransform>(), gameObject.GetComponent<RectTransform>().sizeDelta*2f, 1f).setDelay(1f);

    + +
    +
    +
    +
    +

    LeanTween.tweensRunning

    + + () + + + + + + + + +
    +

    + Defined in + LeanTween.cs:274 +

    + + + +
    + +
    +

    Find out how many tweens you have animating at a given time

    Find out how many tweens you have animating at a given time

    + +
    + + + +
    +

    Example:

    + +
    +

    Debug.Log("I have "+LeanTween.tweensRunning+" animating!");

    + +
    +
    +
    +
    +

    LeanTween.value (Color)

    + +
    + (
      +
    • + gameObject:GameObject +
    • +
    • + from:Color +
    • +
    • + to:Color +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1699 +

    + + + +
    + +
    +

    Tween any particular value (Color)

    + +
    + +
    +

    Parameters:

    + +
      +
    • + gameObject:GameObject + GameObject + + +
      +

      Gameobject that you wish to attach the tween to

      + +
      + +
    • +
    • + from:Color + Color + + +
      +

      The original value to start the tween from

      + +
      + +
    • +
    • + to:Color + Color + + +
      +

      The final Color with which to tween to

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      The time to complete the tween in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    Example Javascript:
    + LeanTween.value( gameObject, Color.red, Color.yellow, 5f).setOnUpdate( function( val:Color ){
    +  Debug.Log("tweened val:"+val);
    + } );
    +
    + Example C#:
    + LeanTween.value( gameObject, Color.red, Color.yellow, 5f).setOnUpdate( (Color val)=>{
    +  Debug.Log("tweened val:"+val);
    + } );

    + +
    +
    +
    +
    +

    LeanTween.value (Color)

    + +
    + (
      +
    • + GameObject +
    • +
    • + callOnUpdate:Action<Color> +
    • +
    • + Color +
    • +
    • + Color +
    • +
    • + Color +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1786 +

    + + + +
    + +
    +

    Tween from one color to another

    + +
    + +
    +

    Parameters:

    + +
      +
    • + GameObject + GameObject + + +
      +

      gameObject GameObject with which to tie the tweening with. This is only used when you need to cancel this tween, it does not actually perform any operations on this gameObject

      + +
      + +
    • +
    • + callOnUpdate:Action<Color> + Action + + +
      +

      The function that is called on every Update frame, this function needs to accept a color value ex: function updateValue( Color val ){ }

      + +
      + +
    • +
    • + Color + Color + + +
      +

      from The original value to start the tween from

      + +
      + +
    • +
    • + Color + Color + + +
      +

      to The value to end the tween on

      + +
      + +
    • +
    • + Color + Color + + +
      +

      time The time to complete the tween in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    Example Javascript:
    + LeanTween.value( gameObject, updateValueExampleCallback, Color.red, Color.green, 1f).setEase(LeanTweenType.easeOutElastic);
    + function updateValueExampleCallback( val:Color ){
    +   Debug.Log("tweened color:"+val+" set this to whatever variable you are tweening...");
    + }
    +
    + Example C#:
    + LeanTween.value( gameObject, updateValueExampleCallback, Color.red, Color.green, 1f).setEase(LeanTweenType.easeOutElastic);
    + void updateValueExampleCallback( Color val ){
    +   Debug.Log("tweened color:"+val+" set this to whatever variable you are tweening...");
    + }

    + +
    +
    +
    +
    +

    LeanTween.value (float)

    + +
    + (
      +
    • + GameObject +
    • +
    • + callOnUpdate:Action<float> +
    • +
    • + float +
    • +
    • + float +
    • +
    • + float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1730 +

    + + + +
    + +
    +

    Tween any particular value, it does not need to be tied to any particular type or GameObject

    + +
    + +
    +

    Parameters:

    + +
      +
    • + GameObject + GameObject + + +
      +

      gameObject GameObject with which to tie the tweening with. This is only used when you need to cancel this tween, it does not actually perform any operations on this gameObject

      + +
      + +
    • +
    • + callOnUpdate:Action<float> + Action + + +
      +

      The function that is called on every Update frame, this function needs to accept a float value ex: function updateValue( float val ){ }

      + +
      + +
    • +
    • + float + Float + + +
      +

      from The original value to start the tween from

      + +
      + +
    • +
    • + float + Float + + +
      +

      to The value to end the tween on

      + +
      + +
    • +
    • + float + Float + + +
      +

      time The time to complete the tween in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    Example Javascript:
    + LeanTween.value( gameObject, updateValueExampleCallback, 180f, 270f, 1f).setEase(LeanTweenType.easeOutElastic);
    + function updateValueExampleCallback( val:float ){
    +   Debug.Log("tweened value:"+val+" set this to whatever variable you are tweening...");
    + }
    +
    + Example C#:
    + LeanTween.value( gameObject, updateValueExampleCallback, 180f, 270f, 1f).setEase(LeanTweenType.easeOutElastic);
    + void updateValueExampleCallback( float val ){
    +   Debug.Log("tweened value:"+val+" set this to whatever variable you are tweening...");
    + }

    + +
    +
    +
    +
    +

    LeanTween.value (float)

    + +
    + (
      +
    • + GameObject +
    • +
    • + callOnUpdateRatio:Action<float,float> +
    • +
    • + float +
    • +
    • + float +
    • +
    • + float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1758 +

    + + + +
    + +
    +

    Tweens any float value, it does not need to be tied to any particular type or GameObject

    + +
    + +
    +

    Parameters:

    + +
      +
    • + GameObject + GameObject + + +
      +

      gameObject GameObject with which to tie the tweening with. This is only used when you need to cancel this tween, it does not actually perform any operations on this gameObject

      + +
      + +
    • +
    • + callOnUpdateRatio:Action<float,float> + Action + + +
      +

      Function that's called every Update frame. It must accept two float values ex: function updateValue( float val, float ratio){ }

      + +
      + +
    • +
    • + float + Float + + +
      +

      from The original value to start the tween from

      + +
      + +
    • +
    • + float + Float + + +
      +

      to The value to end the tween on

      + +
      + +
    • +
    • + float + Float + + +
      +

      time The time to complete the tween in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    Example Javascript:
    + LeanTween.value( gameObject, updateValueExampleCallback, 180f, 270f, 1f).setEase(LeanTweenType.easeOutElastic);
    + function updateValueExampleCallback( val:float, ratio:float ){
    +   Debug.Log("tweened value:"+val+" percent complete:"+ratio100);
    + }
    +
    + Example C#:
    + LeanTween.value( gameObject, updateValueExampleCallback, 180f, 270f, 1f).setEase(LeanTweenType.easeOutElastic);
    + void updateValueExampleCallback( float val, float ratio ){
    +   Debug.Log("tweened value:"+val+" percent complete:"+ratio
    100);
    + }

    + +
    +
    +
    +
    +

    LeanTween.value (float)

    + +
    + (
      +
    • + gameObject:GameObject +
    • +
    • + from:float +
    • +
    • + to:float +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1624 +

    + + + +
    + +
    +

    Tween any particular value (float)

    Tween any particular value (float)

    + +
    + +
    +

    Parameters:

    + +
      +
    • + gameObject:GameObject + GameObject + + +
      +

      Gameobject that you wish to attach the tween to

      + +
      + +
    • +
    • + from:float + Float + + +
      +

      The original value to start the tween from

      + +
      + +
    • +
    • + to:float + Vector3 + + +
      +

      The final float with which to tween to

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      The time to complete the tween in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    Example Javascript:
    + LeanTween.value( gameObject, 1f, 5f, 5f).setOnUpdate( function( val:float ){
    +  Debug.Log("tweened val:"+val);
    + } );
    +
    + Example C#:
    + LeanTween.value( gameObject, 1f, 5f, 5f).setOnUpdate( (float val)=>{
    +  Debug.Log("tweened val:"+val);
    + } );

    + +
    +
    +
    +
    +

    LeanTween.value (float,object)

    + +
    + (
      +
    • + gameObject:GameObject +
    • +
    • + callOnUpdate:Action<float,object> +
    • +
    • + from:float +
    • +
    • + to:float +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1849 +

    + + + +
    + +
    +

    Tween any particular value (float)

    + +
    + +
    +

    Parameters:

    + +
      +
    • + gameObject:GameObject + GameObject + + +
      +

      Gameobject that you wish to attach the tween to

      + +
      + +
    • +
    • + callOnUpdate:Action<float,object> + Action + + +
      +

      The function that is called on every Update frame, this function needs to accept a float value ex: function updateValue( Vector3 val, object obj ){ }

      + +
      + +
    • +
    • + from:float + Float + + +
      +

      The original value to start the tween from

      + +
      + +
    • +
    • + to:float + Vector3 + + +
      +

      The final Vector3 with which to tween to

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      The time to complete the tween in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +
    +

    LeanTween.value (Vector2)

    + +
    + (
      +
    • + gameObject:GameObject +
    • +
    • + from:Vector2 +
    • +
    • + to:Vector2 +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1651 +

    + + + +
    + +
    +

    Tween any particular value (Vector2)

    + +
    + +
    +

    Parameters:

    + +
      +
    • + gameObject:GameObject + GameObject + + +
      +

      Gameobject that you wish to attach the tween to

      + +
      + +
    • +
    • + from:Vector2 + Vector2 + + +
      +

      The original value to start the tween from

      + +
      + +
    • +
    • + to:Vector2 + Vector3 + + +
      +

      The final Vector2 with which to tween to

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      The time to complete the tween in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    Example Javascript:
    + LeanTween.value( gameObject, new Vector2(1f,0f), new Vector3(5f,0f), 5f).setOnUpdate( function( val:Vector2 ){
    +  Debug.Log("tweened val:"+val);
    + } );
    +
    + Example C#:
    + LeanTween.value( gameObject, new Vector3(1f,0f), new Vector3(5f,0f), 5f).setOnUpdate( (Vector2 val)=>{
    +  Debug.Log("tweened val:"+val);
    + } );

    + +
    +
    +
    +
    +

    LeanTween.value (Vector2)

    + +
    + (
      +
    • + gameObject:GameObject +
    • +
    • + callOnUpdate:Action<Vector2> +
    • +
    • + from:Vector2 +
    • +
    • + to:Vector2 +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1819 +

    + + + +
    + +
    +

    Tween any particular value (Vector2), this could be used to tween an arbitrary value like offset property

    + +
    + +
    +

    Parameters:

    + +
      +
    • + gameObject:GameObject + GameObject + + +
      +

      Gameobject that you wish to attach the tween to

      + +
      + +
    • +
    • + callOnUpdate:Action<Vector2> + Action + + +
      +

      The function that is called on every Update frame, this function needs to accept a float value ex: function updateValue( Vector3 val ){ }

      + +
      + +
    • +
    • + from:Vector2 + Float + + +
      +

      The original value to start the tween from

      + +
      + +
    • +
    • + to:Vector2 + Vector2 + + +
      +

      The final Vector3 with which to tween to

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      The time to complete the tween in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +
    +

    LeanTween.value (Vector3)

    + +
    + (
      +
    • + gameObject:GameObject +
    • +
    • + from:Vector3 +
    • +
    • + to:Vector3 +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1675 +

    + + + +
    + +
    +

    Tween any particular value (Vector3)

    + +
    + +
    +

    Parameters:

    + +
      +
    • + gameObject:GameObject + GameObject + + +
      +

      Gameobject that you wish to attach the tween to

      + +
      + +
    • +
    • + from:Vector3 + Vector3 + + +
      +

      The original value to start the tween from

      + +
      + +
    • +
    • + to:Vector3 + Vector3 + + +
      +

      The final Vector3 with which to tween to

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      The time to complete the tween in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +

    Example:

    + +
    +

    Example Javascript:
    + LeanTween.value( gameObject, new Vector3(1f,0f,0f), new Vector3(5f,0f,0f), 5f).setOnUpdate( function( val:Vector3 ){
    +  Debug.Log("tweened val:"+val);
    + } );
    +
    + Example C#:
    + LeanTween.value( gameObject, new Vector3(1f,0f,0f), new Vector3(5f,0f,0f), 5f).setOnUpdate( (Vector3 val)=>{
    +  Debug.Log("tweened val:"+val);
    + } );

    + +
    +
    +
    +
    +

    LeanTween.value (Vector3)

    + +
    + (
      +
    • + gameObject:GameObject +
    • +
    • + callOnUpdate:Action<Vector3> +
    • +
    • + from:Vector3 +
    • +
    • + to:Vector3 +
    • +
    • + time:float +
    • +
    ) +
    + + + LTDescr + + + + + + + + +
    +

    + Defined in + LeanTween.cs:1834 +

    + + + +
    + +
    +

    Tween any particular value (Vector3), this could be used to tween an arbitrary property that uses a Vector

    + +
    + +
    +

    Parameters:

    + +
      +
    • + gameObject:GameObject + GameObject + + +
      +

      Gameobject that you wish to attach the tween to

      + +
      + +
    • +
    • + callOnUpdate:Action<Vector3> + Action + + +
      +

      The function that is called on every Update frame, this function needs to accept a float value ex: function updateValue( Vector3 val ){ }

      + +
      + +
    • +
    • + from:Vector3 + Float + + +
      +

      The original value to start the tween from

      + +
      + +
    • +
    • + to:Vector3 + Vector3 + + +
      +

      The final Vector3 with which to tween to

      + +
      + +
    • +
    • + time:float + Float + + +
      +

      The time to complete the tween in

      + +
      + +
    • +
    +
    + +
    +

    Returns:

    + +
    + LTDescr: +

    LTDescr an object that distinguishes the tween

    + +
    +
    + +
    +
    + + + +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LeanTween.html.meta b/GGJ2020/Assets/LeanTween/Documentation/classes/LeanTween.html.meta new file mode 100644 index 0000000..7a17654 --- /dev/null +++ b/GGJ2020/Assets/LeanTween/Documentation/classes/LeanTween.html.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: beea01b16f84c4f18a168afa5800b612 diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LeanTweenType.html b/GGJ2020/Assets/LeanTween/Documentation/classes/LeanTweenType.html new file mode 100644 index 0000000..f538cff --- /dev/null +++ b/GGJ2020/Assets/LeanTween/Documentation/classes/LeanTweenType.html @@ -0,0 +1,1091 @@ + + + + + LeanTweenType + + + + + + + + + + + +
    +
    +
    +

    - Developed by Dented Pixel
    +
    +
    + API Docs for: LeanTween 2.46
    + + + + + +
    +

    Support LeanTween!

    + +
    +
    + + + + + + + +
    +
    +
    + +

    Maintaining and adding new features takes time, your support is appreciated.

    +
    +
    + + +
    +
    + Show: + + + + + + + +
    + +
    +
    +
    +

    LeanTweenType Class

    +
    + + +
    + Defined in: LeanTween.cs:41 +
    + + +
    + + +
    +

    Pass this to the "ease" parameter, to get a different easing behavior

    + Example:
    LeanTween.rotateX(gameObject, 270.0f, 1.5f).setEase(LeanTweenType.easeInBack);

    + +
    + + +
    + + +
    +
    +

    Item Index

    + + +
    +

    Properties

    + + +
    + + +
    + + +
    +

    Properties

    + +
    +

    easeInBack

    + Integer + + + + + +
    +

    + Defined in + LeanTween.cs:123 +

    + + +
    + +
    + +
    + + + +
    +
    +

    easeInBounce

    + Integer + + + + + +
    +

    + Defined in + LeanTween.cs:114 +

    + + +
    + +
    + +
    + + + +
    +
    +

    easeInCirc

    + Integer + + + + + +
    +

    + Defined in + LeanTween.cs:105 +

    + + +
    + +
    + +
    + + + +
    +
    +

    easeInCubic

    + Integer + + + + + +
    +

    + Defined in + LeanTween.cs:60 +

    + + +
    + +
    + +
    + + + +
    +
    +

    easeInElastic

    + Integer + + + + + +
    +

    + Defined in + LeanTween.cs:132 +

    + + +
    + +
    + +
    + + + +
    +
    +

    easeInExpo

    + Integer + + + + + +
    +

    + Defined in + LeanTween.cs:96 +

    + + +
    + +
    + +
    + + + +
    +
    +

    easeInOutBack

    + Integer + + + + + +
    +

    + Defined in + LeanTween.cs:129 +

    + + +
    + +
    + +
    + + + +
    +
    +

    easeInOutBounce

    + Integer + + + + + +
    +

    + Defined in + LeanTween.cs:120 +

    + + +
    + +
    + +
    + + + +
    +
    +

    easeInOutCirc

    + Integer + + + + + +
    +

    + Defined in + LeanTween.cs:111 +

    + + +
    + +
    + +
    + + + +
    +
    +

    easeInOutCubic

    + Integer + + + + + +
    +

    + Defined in + LeanTween.cs:66 +

    + + +
    + +
    + +
    + + + +
    +
    +

    easeInOutElastic

    + Integer + + + + + +
    +

    + Defined in + LeanTween.cs:138 +

    + + +
    + +
    + +
    + + + +
    +
    +

    easeInOutExpo

    + Integer + + + + + +
    +

    + Defined in + LeanTween.cs:102 +

    + + +
    + +
    + +
    + + + +
    +
    +

    easeInOutQuad

    + Integer + + + + + +
    +

    + Defined in + LeanTween.cs:57 +

    + + +
    + +
    + +
    + + + +
    +
    +

    easeInOutQuart

    + Integer + + + + + +
    +

    + Defined in + LeanTween.cs:75 +

    + + +
    + +
    + +
    + + + +
    +
    +

    easeInOutQuint

    + Integer + + + + + +
    +

    + Defined in + LeanTween.cs:84 +

    + + +
    + +
    + +
    + + + +
    +
    +

    easeInOutSine

    + Integer + + + + + +
    +

    + Defined in + LeanTween.cs:93 +

    + + +
    + +
    + +
    + + + +
    +
    +

    easeInQuad

    + Integer + + + + + +
    +

    + Defined in + LeanTween.cs:54 +

    + + +
    + +
    + +
    + + + +
    +
    +

    easeInQuart

    + Integer + + + + + +
    +

    + Defined in + LeanTween.cs:69 +

    + + +
    + +
    + +
    + + + +
    +
    +

    easeInQuint

    + Integer + + + + + +
    +

    + Defined in + LeanTween.cs:78 +

    + + +
    + +
    + +
    + + + +
    +
    +

    easeInSine

    + Integer + + + + + +
    +

    + Defined in + LeanTween.cs:87 +

    + + +
    + +
    + +
    + + + +
    +
    +

    easeOutBack

    + Integer + + + + + +
    +

    + Defined in + LeanTween.cs:126 +

    + + +
    + +
    + +
    + + + +
    +
    +

    easeOutBounce

    + Integer + + + + + +
    +

    + Defined in + LeanTween.cs:117 +

    + + +
    + +
    + +
    + + + +
    +
    +

    easeOutCirc

    + Integer + + + + + +
    +

    + Defined in + LeanTween.cs:108 +

    + + +
    + +
    + +
    + + + +
    +
    +

    easeOutCubic

    + Integer + + + + + +
    +

    + Defined in + LeanTween.cs:63 +

    + + +
    + +
    + +
    + + + +
    +
    +

    easeOutElastic

    + Integer + + + + + +
    +

    + Defined in + LeanTween.cs:135 +

    + + +
    + +
    + +
    + + + +
    +
    +

    easeOutExpo

    + Integer + + + + + +
    +

    + Defined in + LeanTween.cs:99 +

    + + +
    + +
    + +
    + + + +
    +
    +

    easeOutQuad

    + Integer + + + + + +
    +

    + Defined in + LeanTween.cs:51 +

    + + +
    + +
    + +
    + + + +
    +
    +

    easeOutQuart

    + Integer + + + + + +
    +

    + Defined in + LeanTween.cs:72 +

    + + +
    + +
    + +
    + + + +
    +
    +

    easeOutQuint

    + Integer + + + + + +
    +

    + Defined in + LeanTween.cs:81 +

    + + +
    + +
    + +
    + + + +
    +
    +

    easeOutSine

    + Integer + + + + + +
    +

    + Defined in + LeanTween.cs:90 +

    + + +
    + +
    + +
    + + + +
    +
    +

    linear

    + Integer + + + + + +
    +

    + Defined in + LeanTween.cs:48 +

    + + +
    + +
    + +
    + + + +
    +
    +

    punch

    + Integer + + + + + +
    +

    + Defined in + LeanTween.cs:141 +

    + + +
    + +
    + +
    + + + +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LeanTweenType.html.meta b/GGJ2020/Assets/LeanTween/Documentation/classes/LeanTweenType.html.meta new file mode 100644 index 0000000..57a6283 --- /dev/null +++ b/GGJ2020/Assets/LeanTween/Documentation/classes/LeanTweenType.html.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 85c97d3850f59444cb0751b3bc40b06d diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/index.html b/GGJ2020/Assets/LeanTween/Documentation/classes/index.html new file mode 100644 index 0000000..487fe15 --- /dev/null +++ b/GGJ2020/Assets/LeanTween/Documentation/classes/index.html @@ -0,0 +1,10 @@ + + + + Redirector + + + + Click here to redirect + + diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/index.html.meta b/GGJ2020/Assets/LeanTween/Documentation/classes/index.html.meta new file mode 100644 index 0000000..891c717 --- /dev/null +++ b/GGJ2020/Assets/LeanTween/Documentation/classes/index.html.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: a23cc63a765c44c9c82fb33b1ecb455f diff --git a/GGJ2020/Assets/LeanTween/Documentation/elements.meta b/GGJ2020/Assets/LeanTween/Documentation/elements.meta new file mode 100644 index 0000000..6c785fc --- /dev/null +++ b/GGJ2020/Assets/LeanTween/Documentation/elements.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 932507f3c60bb4fcea847cba753363b8 +folderAsset: yes +timeCreated: 1479470944 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/GGJ2020/Assets/LeanTween/Documentation/elements/index.html b/GGJ2020/Assets/LeanTween/Documentation/elements/index.html new file mode 100644 index 0000000..487fe15 --- /dev/null +++ b/GGJ2020/Assets/LeanTween/Documentation/elements/index.html @@ -0,0 +1,10 @@ + + + + Redirector + + + + Click here to redirect + + diff --git a/GGJ2020/Assets/LeanTween/Documentation/elements/index.html.meta b/GGJ2020/Assets/LeanTween/Documentation/elements/index.html.meta new file mode 100644 index 0000000..b9d37f7 --- /dev/null +++ b/GGJ2020/Assets/LeanTween/Documentation/elements/index.html.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f6a53cd107c1f4d5498ea9c736e3a650 +timeCreated: 1479471015 +licenseType: Store +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/GGJ2020/Assets/LeanTween/Documentation/index.html b/GGJ2020/Assets/LeanTween/Documentation/index.html new file mode 100644 index 0000000..4bc6bbe --- /dev/null +++ b/GGJ2020/Assets/LeanTween/Documentation/index.html @@ -0,0 +1,166 @@ + + + + + + + + + + + + + + + + +
    +
    +
    +

    - Developed by Dented Pixel
    +
    +
    + API Docs for: LeanTween 2.46
    + + + + + +
    +

    Support LeanTween!

    + +
    +
    + + + + + + + +
    +
    +
    + +

    Maintaining and adding new features takes time, your support is appreciated.

    +
    +
    + + +
    +
    + Show: + + + + + + + +
    + +
    +
    +
    +
    +
    +

    + Browse to a module or class using the sidebar to view its API documentation. +

    + +

    Keyboard Shortcuts

    + +
      +
    • Press s to focus the API search box.

    • + +
    • Use Up and Down to select classes, modules, and search results.

    • + +
    • With the API search box or sidebar focused, use -Left or -Right to switch sidebar tabs.

    • + +
    • With the API search box or sidebar focused, use Ctrl+Left and Ctrl+Right to switch sidebar tabs.

    • +
    +
    +
    + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + diff --git a/GGJ2020/Assets/LeanTween/Documentation/index.html.meta b/GGJ2020/Assets/LeanTween/Documentation/index.html.meta new file mode 100644 index 0000000..7a0b59d --- /dev/null +++ b/GGJ2020/Assets/LeanTween/Documentation/index.html.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 78eeb9616e21d4178b574871040d7fa0 diff --git a/GGJ2020/Assets/LeanTween/Editor.meta b/GGJ2020/Assets/LeanTween/Editor.meta new file mode 100644 index 0000000..0d4266c --- /dev/null +++ b/GGJ2020/Assets/LeanTween/Editor.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 19bfca9f9a913415ea58580f6667f922 +folderAsset: yes +timeCreated: 1454272449 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/GGJ2020/Assets/LeanTween/Editor/LeanTweenDocumentationEditor.cs b/GGJ2020/Assets/LeanTween/Editor/LeanTweenDocumentationEditor.cs new file mode 100644 index 0000000..a854d7c --- /dev/null +++ b/GGJ2020/Assets/LeanTween/Editor/LeanTweenDocumentationEditor.cs @@ -0,0 +1,59 @@ +using UnityEngine; +using System.Collections; +#if UNITY_EDITOR +using UnityEditor; + +public class LeanTweenDocumentationEditor : Editor { + + [MenuItem ("Help/LeanTween Documentation")] + static void openDocumentation() + { + #if !UNITY_3_5 && !UNITY_4_0 && !UNITY_4_0_1 && !UNITY_4_1 && !UNITY_4_2 && !UNITY_4_3 + // Loops through all items in case the user has moved the default installation directory + string[] guids = AssetDatabase.FindAssets ("LeanTween", null); + string documentationPath = ""; + foreach (string guid in guids){ + string path = AssetDatabase.GUIDToAssetPath(guid); + if(path.IndexOf("classes/LeanTween.html")>=0){ + documentationPath = path; + break; + } + } + documentationPath = documentationPath.Substring(documentationPath.IndexOf("/")); + string browserPath = "file://" + Application.dataPath + documentationPath + "#index"; + Application.OpenURL(browserPath); + + #else + // assumes the default installation directory + string documentationPath = "file://"+Application.dataPath + "/LeanTween/Documentation/classes/LeanTween.html#index"; + Application.OpenURL(documentationPath); + + #endif + } + + [MenuItem ("Help/LeanTween Forum (ask questions)")] + static void openForum() + { + Application.OpenURL("http://forum.unity3d.com/threads/leantween-a-tweening-engine-that-is-up-to-5x-faster-than-competing-engines.161113/"); + } + + [MenuItem ("Help/LeanTween GitHub (contribute code)")] + static void openGit() + { + Application.OpenURL("https://github.com/dentedpixel/LeanTween"); + } + + [MenuItem ("Help/LeanTween Support (donate)")] + static void openLTDonate() + { + Application.OpenURL("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YJPUT3RAK5VL8"); + } + + [MenuItem ("Help/Dented Pixel News")] + static void openDPNews() + { + Application.OpenURL("http://dentedpixel.com/category/developer-diary/"); + } +} + +#endif \ No newline at end of file diff --git a/GGJ2020/Assets/LeanTween/Editor/LeanTweenDocumentationEditor.cs.meta b/GGJ2020/Assets/LeanTween/Editor/LeanTweenDocumentationEditor.cs.meta new file mode 100644 index 0000000..1bcb938 --- /dev/null +++ b/GGJ2020/Assets/LeanTween/Editor/LeanTweenDocumentationEditor.cs.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 52fea17a2d56d46afa0d6cb52e2a4335 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} diff --git a/GGJ2020/Assets/LeanTween/License.txt b/GGJ2020/Assets/LeanTween/License.txt new file mode 100644 index 0000000..4f43b9a --- /dev/null +++ b/GGJ2020/Assets/LeanTween/License.txt @@ -0,0 +1,31 @@ +The MIT License (MIT) + +Copyright (c) 2017 Russell Savage - Dented Pixel + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +TERMS OF USE - EASING EQUATIONS +Open source under the BSD License. +Copyright (c)2001 Robert Penner +All rights reserved. +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +Neither the name of the author nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/GGJ2020/Assets/LeanTween/License.txt.meta b/GGJ2020/Assets/LeanTween/License.txt.meta new file mode 100644 index 0000000..1d0d8ca --- /dev/null +++ b/GGJ2020/Assets/LeanTween/License.txt.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e389e9bcd4f944c338327697bd209cad +timeCreated: 1469016738 +licenseType: Store +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/GGJ2020/Assets/LeanTween/ReadMe.txt b/GGJ2020/Assets/LeanTween/ReadMe.txt new file mode 100644 index 0000000..49687de --- /dev/null +++ b/GGJ2020/Assets/LeanTween/ReadMe.txt @@ -0,0 +1,9 @@ +LeanTween is an efficient tweening engine for Unity3d + +Full Documentation: + http://dentedpixel.com/LeanTweenDocumentation/classes/LeanTween.html + This can also be accessed offline! From the Unity menu Help->LeanTween Documentation + +Getting Started + + There are many examples included! Look in the “LeanTween/LeanTweenExamples" folder to see many of the methods outlined. diff --git a/GGJ2020/Assets/LeanTween/ReadMe.txt.meta b/GGJ2020/Assets/LeanTween/ReadMe.txt.meta new file mode 100644 index 0000000..c08c74a --- /dev/null +++ b/GGJ2020/Assets/LeanTween/ReadMe.txt.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: f1e0da947b69648fdb1884d602088d92 diff --git a/GGJ2020/Assets/Plugins.meta b/GGJ2020/Assets/Plugins.meta new file mode 100644 index 0000000..d67927c --- /dev/null +++ b/GGJ2020/Assets/Plugins.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 1839327a1a81c4d979f53b07027ab4b9 diff --git a/GGJ2020/Assets/Plugins/LeanTween.meta b/GGJ2020/Assets/Plugins/LeanTween.meta new file mode 100644 index 0000000..e69c1be --- /dev/null +++ b/GGJ2020/Assets/Plugins/LeanTween.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a3f23ec8eb7c24f0bbb1d41bf96c154f +folderAsset: yes +timeCreated: 1469292088 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/GGJ2020/Assets/Plugins/LeanTween/LTDescr.cs b/GGJ2020/Assets/Plugins/LeanTween/LTDescr.cs new file mode 100644 index 0000000..aed6fb6 --- /dev/null +++ b/GGJ2020/Assets/Plugins/LeanTween/LTDescr.cs @@ -0,0 +1,2285 @@ +//namespace DentedPixel{ +using System; +using UnityEngine; + +/** +* Internal Representation of a Tween
    +*
    +* This class represents all of the optional parameters you can pass to a method (it also represents the internal representation of the tween).

    +* Optional Parameters are passed at the end of every method:
    +*
    +*   Example:
    +*   LeanTween.moveX( gameObject, 1f, 1f).setEase( LeanTweenType.easeInQuad ).setDelay(1f);
    +*
    +* You can pass the optional parameters in any order, and chain on as many as you wish.
    +* You can also pass parameters at a later time by saving a reference to what is returned.
    +*
    +* Retrieve a unique id for the tween by using the "id" property. You can pass this to LeanTween.pause, LeanTween.resume, LeanTween.cancel, LeanTween.isTweening methods
    +*
    +*   

    Example:

    +*   int id = LeanTween.moveX(gameObject, 1f, 3f).id;
    +*
      // pause a specific tween
    +*   LeanTween.pause(id);
    +*
      // resume later
    +*   LeanTween.resume(id);
    +*
      // check if it is tweening before kicking of a new tween
    +*   if( LeanTween.isTweening( id ) ){
    +*       LeanTween.cancel( id );
    +*       LeanTween.moveZ(gameObject, 10f, 3f);
    +*   }
    +* @class LTDescr +* @constructor +*/ +public class LTDescr +{ + public bool toggle; + public bool useEstimatedTime; + public bool useFrames; + public bool useManualTime; + public bool usesNormalDt; + public bool hasInitiliazed; + public bool hasExtraOnCompletes; + public bool hasPhysics; + public bool onCompleteOnRepeat; + public bool onCompleteOnStart; + public bool useRecursion; + public float ratioPassed; + public float passed; + public float delay; + public float time; + public float speed; + public float lastVal; + private uint _id; + public int loopCount; + public uint counter = uint.MaxValue; + public float direction; + public float directionLast; + public float overshoot; + public float period; + public float scale; + public bool destroyOnComplete; + public Transform trans; + internal Vector3 fromInternal; + public Vector3 from { get { return this.fromInternal; } set { this.fromInternal = value; } } + internal Vector3 toInternal; + public Vector3 to { get { return this.toInternal; } set { this.toInternal = value; } } + internal Vector3 diff; + internal Vector3 diffDiv2; + public TweenAction type; + private LeanTweenType easeType; + public LeanTweenType loopType; + + public bool hasUpdateCallback; + + public EaseTypeDelegate easeMethod; + public ActionMethodDelegate easeInternal {get; set; } + public ActionMethodDelegate initInternal {get; set; } + public delegate Vector3 EaseTypeDelegate(); + public delegate void ActionMethodDelegate(); + #if !UNITY_3_5 && !UNITY_4_0 && !UNITY_4_0_1 && !UNITY_4_1 && !UNITY_4_2 + public SpriteRenderer spriteRen; + #endif + + #if !UNITY_3_5 && !UNITY_4_0 && !UNITY_4_0_1 && !UNITY_4_1 && !UNITY_4_2 && !UNITY_4_3 && !UNITY_4_5 + public RectTransform rectTransform; + public UnityEngine.UI.Text uiText; + public UnityEngine.UI.Image uiImage; + public UnityEngine.UI.RawImage rawImage; + public UnityEngine.Sprite[] sprites; + #endif + + public LTDescrOptional _optional = new LTDescrOptional(); + + public override string ToString(){ + return (trans!=null ? "name:"+trans.gameObject.name : "gameObject:null")+" toggle:"+toggle+" passed:"+passed+" time:"+time+" delay:"+delay+" direction:"+direction+" from:"+from+" to:"+to+" diff:"+diff+" type:"+type+" ease:"+easeType+" useEstimatedTime:"+useEstimatedTime+" id:"+id+" hasInitiliazed:"+hasInitiliazed; + } + + public LTDescr(){ + + } + + [System.Obsolete("Use 'LeanTween.cancel( id )' instead")] + public LTDescr cancel( GameObject gameObject ){ + // Debug.Log("canceling id:"+this._id+" this.uniqueId:"+this.uniqueId+" go:"+this.trans.gameObject); + if(gameObject==this.trans.gameObject) + LeanTween.removeTween((int)this._id, this.uniqueId); + return this; + } + + public int uniqueId{ + get{ + uint toId = _id | counter << 16; + + /*uint backId = toId & 0xFFFF; + uint backCounter = toId >> 16; + if(_id!=backId || backCounter!=counter){ + Debug.LogError("BAD CONVERSION toId:"+_id); + }*/ + + return (int)toId; + } + } + + public int id{ + get{ + return uniqueId; + } + } + + public LTDescrOptional optional{ + get{ + return _optional; + } + set{ + this._optional = optional; + } + } + + public void reset(){ + this.toggle = this.useRecursion = this.usesNormalDt = true; + this.trans = null; + this.spriteRen = null; + this.passed = this.delay = this.lastVal = 0.0f; + this.hasUpdateCallback = this.useEstimatedTime = this.useFrames = this.hasInitiliazed = this.onCompleteOnRepeat = this.destroyOnComplete = this.onCompleteOnStart = this.useManualTime = this.hasExtraOnCompletes = false; + this.easeType = LeanTweenType.linear; + this.loopType = LeanTweenType.once; + this.loopCount = 0; + this.direction = this.directionLast = this.overshoot = this.scale = 1.0f; + this.period = 0.3f; + this.speed = -1f; + this.easeMethod = this.easeLinear; + this.from = this.to = Vector3.zero; + this._optional.reset(); + + + } + + // Initialize and Internal Methods + + public LTDescr setMoveX(){ + this.type = TweenAction.MOVE_X; + this.initInternal = ()=>{ this.fromInternal.x = trans.position.x; }; + this.easeInternal = ()=>{ trans.position=new Vector3( easeMethod().x,trans.position.y,trans.position.z); }; + return this; + } + + public LTDescr setMoveY(){ + this.type = TweenAction.MOVE_Y; + this.initInternal = ()=>{ this.fromInternal.x = trans.position.y; }; + this.easeInternal = ()=>{ trans.position=new Vector3( trans.position.x,easeMethod().x,trans.position.z); }; + return this; + } + + public LTDescr setMoveZ(){ + this.type = TweenAction.MOVE_Z; + this.initInternal = ()=>{ this.fromInternal.x = trans.position.z; };; + this.easeInternal = ()=>{ trans.position=new Vector3( trans.position.x,trans.position.y,easeMethod().x); }; + return this; + } + + public LTDescr setMoveLocalX(){ + this.type = TweenAction.MOVE_LOCAL_X; + this.initInternal = ()=>{ this.fromInternal.x = trans.localPosition.x; }; + this.easeInternal = ()=>{ trans.localPosition=new Vector3( easeMethod().x,trans.localPosition.y,trans.localPosition.z); }; + return this; + } + + public LTDescr setMoveLocalY(){ + this.type = TweenAction.MOVE_LOCAL_Y; + this.initInternal = ()=>{ this.fromInternal.x = trans.localPosition.y; }; + this.easeInternal = ()=>{ trans.localPosition=new Vector3( trans.localPosition.x,easeMethod().x,trans.localPosition.z); }; + return this; + } + + public LTDescr setMoveLocalZ(){ + this.type = TweenAction.MOVE_LOCAL_Z; + this.initInternal = ()=>{ this.fromInternal.x = trans.localPosition.z; }; + this.easeInternal = ()=>{ trans.localPosition=new Vector3( trans.localPosition.x,trans.localPosition.y,easeMethod().x); }; + return this; + } + + private void initFromInternal(){ this.fromInternal.x = 0; } + + public LTDescr setMoveCurved(){ + this.type = TweenAction.MOVE_CURVED; + this.initInternal = this.initFromInternal; + this.easeInternal = ()=>{ + newVect = easeMethod(); + val = newVect.x; + if(this._optional.path.orientToPath){ + if(this._optional.path.orientToPath2d){ + this._optional.path.place2d( trans, val ); + }else{ + this._optional.path.place( trans, val ); + } + }else{ + trans.position = this._optional.path.point( val ); + } + }; + return this; + } + + public LTDescr setMoveCurvedLocal(){ + this.type = TweenAction.MOVE_CURVED_LOCAL; + this.initInternal = this.initFromInternal; + this.easeInternal = ()=>{ + newVect = easeMethod(); + val = newVect.x; + if(this._optional.path.orientToPath){ + if(this._optional.path.orientToPath2d){ + this._optional.path.placeLocal2d( trans, val ); + }else{ + this._optional.path.placeLocal( trans, val ); + } + }else{ + trans.localPosition = this._optional.path.point( val ); + } + }; + return this; + } + + public LTDescr setMoveSpline(){ + this.type = TweenAction.MOVE_SPLINE; + this.initInternal = this.initFromInternal; + this.easeInternal = ()=>{ + newVect = easeMethod(); + val = newVect.x; + if(this._optional.spline.orientToPath){ + if(this._optional.spline.orientToPath2d){ + this._optional.spline.place2d( trans, val ); + }else{ + this._optional.spline.place( trans, val ); + } + }else{ + trans.position = this._optional.spline.point( val ); + } + }; + return this; + } + + public LTDescr setMoveSplineLocal(){ + this.type = TweenAction.MOVE_SPLINE_LOCAL; + this.initInternal = this.initFromInternal; + this.easeInternal = ()=>{ + newVect = easeMethod(); + val = newVect.x; + if(this._optional.spline.orientToPath){ + if(this._optional.spline.orientToPath2d){ + this._optional.spline.placeLocal2d( trans, val ); + }else{ + this._optional.spline.placeLocal( trans, val ); + } + }else{ + trans.localPosition = this._optional.spline.point( val ); + } + }; + return this; + } + + public LTDescr setScaleX(){ + this.type = TweenAction.SCALE_X; + this.initInternal = ()=>{ this.fromInternal.x = trans.localScale.x; }; + this.easeInternal = ()=>{ trans.localScale = new Vector3( easeMethod().x,trans.localScale.y,trans.localScale.z); }; + return this; + } + + public LTDescr setScaleY(){ + this.type = TweenAction.SCALE_Y; + this.initInternal = ()=>{ this.fromInternal.x = trans.localScale.y; }; + this.easeInternal = ()=>{ trans.localScale=new Vector3( trans.localScale.x,easeMethod().x,trans.localScale.z); }; + return this; + } + + public LTDescr setScaleZ(){ + this.type = TweenAction.SCALE_Z; + this.initInternal = ()=>{ this.fromInternal.x = trans.localScale.z; }; + this.easeInternal = ()=>{ trans.localScale=new Vector3( trans.localScale.x,trans.localScale.y,easeMethod().x); }; + return this; + } + + public LTDescr setRotateX(){ + this.type = TweenAction.ROTATE_X; + this.initInternal = ()=>{ this.fromInternal.x = trans.eulerAngles.x; this.toInternal.x = LeanTween.closestRot( this.fromInternal.x, this.toInternal.x);}; + this.easeInternal = ()=>{ trans.eulerAngles=new Vector3(easeMethod().x,trans.eulerAngles.y,trans.eulerAngles.z); }; + return this; + } + + public LTDescr setRotateY(){ + this.type = TweenAction.ROTATE_Y; + this.initInternal = ()=>{ this.fromInternal.x = trans.eulerAngles.y; this.toInternal.x = LeanTween.closestRot( this.fromInternal.x, this.toInternal.x);}; + this.easeInternal = ()=>{ trans.eulerAngles=new Vector3(trans.eulerAngles.x,easeMethod().x,trans.eulerAngles.z); }; + return this; + } + + public LTDescr setRotateZ(){ + this.type = TweenAction.ROTATE_Z; + this.initInternal = ()=>{ + this.fromInternal.x = trans.eulerAngles.z; + this.toInternal.x = LeanTween.closestRot( this.fromInternal.x, this.toInternal.x); + }; + this.easeInternal = ()=>{ trans.eulerAngles=new Vector3(trans.eulerAngles.x,trans.eulerAngles.y,easeMethod().x); }; + return this; + } + + public LTDescr setRotateAround(){ + this.type = TweenAction.ROTATE_AROUND; + this.initInternal = ()=>{ + this.fromInternal.x = 0f; + this._optional.origRotation = trans.rotation; + }; + this.easeInternal = ()=>{ + newVect = easeMethod(); + val = newVect.x; + Vector3 origPos = trans.localPosition; + Vector3 rotateAroundPt = (Vector3)trans.TransformPoint( this._optional.point ); + // Debug.Log("this._optional.point:"+this._optional.point); + trans.RotateAround(rotateAroundPt, this._optional.axis, -this._optional.lastVal); + Vector3 diff = origPos - trans.localPosition; + + trans.localPosition = origPos - diff; // Subtract the amount the object has been shifted over by the rotate, to get it back to it's orginal position + trans.rotation = this._optional.origRotation; + + rotateAroundPt = (Vector3)trans.TransformPoint( this._optional.point ); + trans.RotateAround(rotateAroundPt, this._optional.axis, val); + + this._optional.lastVal = val; + }; + return this; + } + + public LTDescr setRotateAroundLocal(){ + this.type = TweenAction.ROTATE_AROUND_LOCAL; + this.initInternal = ()=>{ + this.fromInternal.x = 0f; + this._optional.origRotation = trans.localRotation; + }; + this.easeInternal = ()=>{ + newVect = easeMethod(); + val = newVect.x; + Vector3 origPos = trans.localPosition; + trans.RotateAround((Vector3)trans.TransformPoint( this._optional.point ), trans.TransformDirection(this._optional.axis), -this._optional.lastVal); + Vector3 diff = origPos - trans.localPosition; + + trans.localPosition = origPos - diff; // Subtract the amount the object has been shifted over by the rotate, to get it back to it's orginal position + trans.localRotation = this._optional.origRotation; + Vector3 rotateAroundPt = (Vector3)trans.TransformPoint( this._optional.point ); + trans.RotateAround(rotateAroundPt, trans.TransformDirection(this._optional.axis), val); + + this._optional.lastVal = val; + }; + return this; + } + + public LTDescr setAlpha(){ + this.type = TweenAction.ALPHA; + this.initInternal = ()=>{ + #if UNITY_3_5 || UNITY_4_0 || UNITY_4_0_1 || UNITY_4_1 || UNITY_4_2 + if(trans.gameObject.renderer){ this.fromInternal.x = trans.gameObject.renderer.material.color.a; }else if(trans.childCount>0){ foreach (Transform child in trans) { if(child.gameObject.renderer!=null){ Color col = child.gameObject.renderer.material.color; this.fromInternal.x = col.a; break; }}} + this.easeInternal = this.alpha; + break; + #else + SpriteRenderer ren = trans.GetComponent(); + if(ren!=null){ + this.fromInternal.x = ren.color.a; + }else{ + if(trans.GetComponent()!=null && trans.GetComponent().material.HasProperty("_Color")){ + this.fromInternal.x = trans.GetComponent().material.color.a; + }else if(trans.GetComponent()!=null && trans.GetComponent().material.HasProperty("_TintColor")){ + Color col = trans.GetComponent().material.GetColor("_TintColor"); + this.fromInternal.x = col.a; + }else if(trans.childCount>0){ + foreach (Transform child in trans) { + if(child.gameObject.GetComponent()!=null){ + Color col = child.gameObject.GetComponent().material.color; + this.fromInternal.x = col.a; + break; + } + } + } + } + #endif + + this.easeInternal = ()=>{ + val = easeMethod().x; + #if UNITY_3_5 || UNITY_4_0 || UNITY_4_0_1 || UNITY_4_1 || UNITY_4_2 + alphaRecursive(this.trans, val, this.useRecursion); + #else + if(this.spriteRen!=null){ + this.spriteRen.color = new Color( this.spriteRen.color.r, this.spriteRen.color.g, this.spriteRen.color.b, val); + alphaRecursiveSprite(this.trans, val); + }else{ + alphaRecursive(this.trans, val, this.useRecursion); + } + #endif + }; + + }; + this.easeInternal = ()=>{ + newVect = easeMethod(); + val = newVect.x; + #if UNITY_3_5 || UNITY_4_0 || UNITY_4_0_1 || UNITY_4_1 || UNITY_4_2 + alphaRecursive(this.trans, val, this.useRecursion); + #else + if(this.spriteRen!=null){ + this.spriteRen.color = new Color( this.spriteRen.color.r, this.spriteRen.color.g, this.spriteRen.color.b, val); + alphaRecursiveSprite(this.trans, val); + }else{ + alphaRecursive(this.trans, val, this.useRecursion); + } + #endif + }; + return this; + } + + public LTDescr setTextAlpha(){ + this.type = TweenAction.TEXT_ALPHA; + this.initInternal = ()=>{ + this.uiText = trans.GetComponent(); + this.fromInternal.x = this.uiText != null ? this.uiText.color.a : 1f; + }; + this.easeInternal = ()=>{ textAlphaRecursive( trans, easeMethod().x, this.useRecursion ); }; + return this; + } + + public LTDescr setAlphaVertex(){ + this.type = TweenAction.ALPHA_VERTEX; + this.initInternal = ()=>{ this.fromInternal.x = trans.GetComponent().mesh.colors32[0].a; }; + this.easeInternal = ()=>{ + newVect = easeMethod(); + val = newVect.x; + Mesh mesh = trans.GetComponent().mesh; + Vector3[] vertices = mesh.vertices; + Color32[] colors = new Color32[vertices.Length]; + if (colors.Length == 0){ //MaxFW fix: add vertex colors if the mesh doesn't have any + Color32 transparentWhiteColor32 = new Color32(0xff, 0xff, 0xff, 0x00); + colors = new Color32[mesh.vertices.Length]; + for (int k=0; k{ + #if UNITY_3_5 || UNITY_4_0 || UNITY_4_0_1 || UNITY_4_1 || UNITY_4_2 + if(trans.gameObject.renderer){ + this.setFromColor( trans.gameObject.renderer.material.color ); + }else if(trans.childCount>0){ + foreach (Transform child in trans) { + if(child.gameObject.renderer!=null){ + this.setFromColor( child.gameObject.renderer.material.color ); + break; + } + } + } + #else + SpriteRenderer renColor = trans.GetComponent(); + if(renColor!=null){ + this.setFromColor( renColor.color ); + }else{ + if(trans.GetComponent()!=null && trans.GetComponent().material.HasProperty("_Color")){ + Color col = trans.GetComponent().material.color; + this.setFromColor( col ); + }else if(trans.GetComponent()!=null && trans.GetComponent().material.HasProperty("_TintColor")){ + Color col = trans.GetComponent().material.GetColor ("_TintColor"); + this.setFromColor( col ); + }else if(trans.childCount>0){ + foreach (Transform child in trans) { + if(child.gameObject.GetComponent()!=null){ + Color col = child.gameObject.GetComponent().material.color; + this.setFromColor( col ); + break; + } + } + } + } + #endif + }; + this.easeInternal = ()=>{ + newVect = easeMethod(); + val = newVect.x; + Color toColor = tweenColor(this, val); + + #if !UNITY_3_5 && !UNITY_4_0 && !UNITY_4_0_1 && !UNITY_4_1 && !UNITY_4_2 + + if(this.spriteRen!=null){ + this.spriteRen.color = toColor; + colorRecursiveSprite( trans, toColor); + }else{ + #endif + // Debug.Log("val:"+val+" tween:"+tween+" tween.diff:"+tween.diff); + if(this.type==TweenAction.COLOR) + colorRecursive(trans, toColor, this.useRecursion); + + #if !UNITY_3_5 && !UNITY_4_0 && !UNITY_4_0_1 && !UNITY_4_1 && !UNITY_4_2 + } + #endif + if(dt!=0f && this._optional.onUpdateColor!=null){ + this._optional.onUpdateColor(toColor); + }else if(dt!=0f && this._optional.onUpdateColorObject!=null){ + this._optional.onUpdateColorObject(toColor, this._optional.onUpdateParam); + } + }; + return this; + } + + public LTDescr setCallbackColor(){ + this.type = TweenAction.CALLBACK_COLOR; + this.initInternal = ()=>{ this.diff = new Vector3(1.0f,0.0f,0.0f); }; + this.easeInternal = ()=>{ + newVect = easeMethod(); + val = newVect.x; + Color toColor = tweenColor(this, val); + + #if !UNITY_3_5 && !UNITY_4_0 && !UNITY_4_0_1 && !UNITY_4_1 && !UNITY_4_2 + if(this.spriteRen!=null){ + this.spriteRen.color = toColor; + colorRecursiveSprite( trans, toColor); + }else{ + #endif + // Debug.Log("val:"+val+" tween:"+tween+" tween.diff:"+tween.diff); + if(this.type==TweenAction.COLOR) + colorRecursive(trans, toColor, this.useRecursion); + + #if !UNITY_3_5 && !UNITY_4_0 && !UNITY_4_0_1 && !UNITY_4_1 && !UNITY_4_2 + } + #endif + if(dt!=0f && this._optional.onUpdateColor!=null){ + this._optional.onUpdateColor(toColor); + }else if(dt!=0f && this._optional.onUpdateColorObject!=null){ + this._optional.onUpdateColorObject(toColor, this._optional.onUpdateParam); + } + }; + return this; + } + + + #if !UNITY_3_5 && !UNITY_4_0 && !UNITY_4_0_1 && !UNITY_4_1 && !UNITY_4_2 && !UNITY_4_3 && !UNITY_4_5 + + public LTDescr setTextColor(){ + this.type = TweenAction.TEXT_COLOR; + this.initInternal = ()=>{ + this.uiText = trans.GetComponent(); + this.setFromColor( this.uiText != null ? this.uiText.color : Color.white ); + }; + this.easeInternal = ()=>{ + newVect = easeMethod(); + val = newVect.x; + Color toColor = tweenColor(this, val); + this.uiText.color = toColor; + if (dt!=0f && this._optional.onUpdateColor != null) + this._optional.onUpdateColor(toColor); + + if(this.useRecursion && trans.childCount>0) + textColorRecursive(this.trans, toColor); + }; + return this; + } + + public LTDescr setCanvasAlpha(){ + this.type = TweenAction.CANVAS_ALPHA; + this.initInternal = ()=>{ + this.uiImage = trans.GetComponent(); + if(this.uiImage!=null){ + this.fromInternal.x = this.uiImage.color.a; + }else{ + this.rawImage = trans.GetComponent(); + if(this.rawImage != null){ + this.fromInternal.x = this.rawImage.color.a; + }else{ + this.fromInternal.x = 1f; + } + } + + }; + this.easeInternal = ()=>{ + newVect = easeMethod(); + val = newVect.x; + if(this.uiImage!=null){ + Color c = this.uiImage.color; c.a = val; this.uiImage.color = c; + }else if(this.rawImage!=null){ + Color c = this.rawImage.color; c.a = val; this.rawImage.color = c; + } + if(this.useRecursion){ + alphaRecursive( this.rectTransform, val, 0 ); + textAlphaChildrenRecursive( this.rectTransform, val); + } + }; + return this; + } + + public LTDescr setCanvasGroupAlpha(){ + this.type = TweenAction.CANVASGROUP_ALPHA; + this.initInternal = ()=>{this.fromInternal.x = trans.GetComponent().alpha;}; + this.easeInternal = ()=>{ this.trans.GetComponent().alpha = easeMethod().x; }; + return this; + } + + public LTDescr setCanvasColor(){ + this.type = TweenAction.CANVAS_COLOR; + this.initInternal = ()=>{ + this.uiImage = trans.GetComponent(); + if(this.uiImage==null){ + this.rawImage = trans.GetComponent(); + this.setFromColor( this.rawImage!=null ? this.rawImage.color : Color.white ); + }else{ + this.setFromColor( this.uiImage.color ); + } + + }; + this.easeInternal = ()=>{ + newVect = easeMethod(); + val = newVect.x; + Color toColor = tweenColor(this, val); + if(this.uiImage!=null){ + this.uiImage.color = toColor; + }else if(this.rawImage!=null){ + this.rawImage.color = toColor; + } + + if (dt!=0f && this._optional.onUpdateColor != null) + this._optional.onUpdateColor(toColor); + + if(this.useRecursion) + colorRecursive(this.rectTransform, toColor); + }; + return this; + } + + public LTDescr setCanvasMoveX(){ + this.type = TweenAction.CANVAS_MOVE_X; + this.initInternal = ()=>{ this.fromInternal.x = this.rectTransform.anchoredPosition3D.x; }; + this.easeInternal = ()=>{ Vector3 c = this.rectTransform.anchoredPosition3D; this.rectTransform.anchoredPosition3D = new Vector3(easeMethod().x, c.y, c.z); }; + return this; + } + + public LTDescr setCanvasMoveY(){ + this.type = TweenAction.CANVAS_MOVE_Y; + this.initInternal = ()=>{ this.fromInternal.x = this.rectTransform.anchoredPosition3D.y; }; + this.easeInternal = ()=>{ Vector3 c = this.rectTransform.anchoredPosition3D; this.rectTransform.anchoredPosition3D = new Vector3(c.x, easeMethod().x, c.z); }; + return this; + } + + public LTDescr setCanvasMoveZ(){ + this.type = TweenAction.CANVAS_MOVE_Z; + this.initInternal = ()=>{ this.fromInternal.x = this.rectTransform.anchoredPosition3D.z; }; + this.easeInternal = ()=>{ Vector3 c = this.rectTransform.anchoredPosition3D; this.rectTransform.anchoredPosition3D = new Vector3(c.x, c.y, easeMethod().x); }; + return this; + } + + private void initCanvasRotateAround(){ + this.lastVal = 0.0f; + this.fromInternal.x = 0.0f; + this._optional.origRotation = this.rectTransform.rotation; + } + + public LTDescr setCanvasRotateAround(){ + this.type = TweenAction.CANVAS_ROTATEAROUND; + this.initInternal = this.initCanvasRotateAround; + this.easeInternal = ()=>{ + newVect = easeMethod(); + val = newVect.x; + RectTransform rect = this.rectTransform; + Vector3 origPos = rect.localPosition; + rect.RotateAround((Vector3)rect.TransformPoint( this._optional.point ), this._optional.axis, -val); + Vector3 diff = origPos - rect.localPosition; + + rect.localPosition = origPos - diff; // Subtract the amount the object has been shifted over by the rotate, to get it back to it's orginal position + rect.rotation = this._optional.origRotation; + rect.RotateAround((Vector3)rect.TransformPoint( this._optional.point ), this._optional.axis, val); + }; + return this; + } + + public LTDescr setCanvasRotateAroundLocal(){ + this.type = TweenAction.CANVAS_ROTATEAROUND_LOCAL; + this.initInternal = this.initCanvasRotateAround; + this.easeInternal = ()=>{ + newVect = easeMethod(); + val = newVect.x; + RectTransform rect = this.rectTransform; + Vector3 origPos = rect.localPosition; + rect.RotateAround((Vector3)rect.TransformPoint( this._optional.point ), rect.TransformDirection(this._optional.axis), -val); + Vector3 diff = origPos - rect.localPosition; + + rect.localPosition = origPos - diff; // Subtract the amount the object has been shifted over by the rotate, to get it back to it's orginal position + rect.rotation = this._optional.origRotation; + rect.RotateAround((Vector3)rect.TransformPoint( this._optional.point ), rect.TransformDirection(this._optional.axis), val); + }; + return this; + } + + public LTDescr setCanvasPlaySprite(){ + this.type = TweenAction.CANVAS_PLAYSPRITE; + this.initInternal = ()=>{ + this.uiImage = trans.GetComponent(); + this.fromInternal.x = 0f; + }; + this.easeInternal = ()=>{ + newVect = easeMethod(); + val = newVect.x; + int frame = (int)Mathf.Round( val ); + this.uiImage.sprite = this.sprites[ frame ]; + }; + return this; + } + + public LTDescr setCanvasMove(){ + this.type = TweenAction.CANVAS_MOVE; + this.initInternal = ()=>{ this.fromInternal = this.rectTransform.anchoredPosition3D; }; + this.easeInternal = ()=>{ this.rectTransform.anchoredPosition3D = easeMethod(); }; + return this; + } + + public LTDescr setCanvasScale(){ + this.type = TweenAction.CANVAS_SCALE; + this.initInternal = ()=>{ this.from = this.rectTransform.localScale; }; + this.easeInternal = ()=>{ this.rectTransform.localScale = easeMethod(); }; + return this; + } + + public LTDescr setCanvasSizeDelta(){ + this.type = TweenAction.CANVAS_SIZEDELTA; + this.initInternal = ()=>{ this.from = this.rectTransform.sizeDelta; }; + this.easeInternal = ()=>{ this.rectTransform.sizeDelta = easeMethod(); }; + return this; + } + #endif + + private void callback(){ newVect = easeMethod(); val = newVect.x; } + + public LTDescr setCallback(){ + this.type = TweenAction.CALLBACK; + this.initInternal = ()=>{}; + this.easeInternal = this.callback; + return this; + } + public LTDescr setValue3(){ + this.type = TweenAction.VALUE3; + this.initInternal = ()=>{}; + this.easeInternal = this.callback; + return this; + } + + public LTDescr setMove(){ + this.type = TweenAction.MOVE; + this.initInternal = ()=>{ this.from = trans.position; }; + this.easeInternal = ()=>{ + newVect = easeMethod(); + trans.position = newVect; + }; + return this; + } + + public LTDescr setMoveLocal(){ + this.type = TweenAction.MOVE_LOCAL; + this.initInternal = ()=>{ this.from = trans.localPosition; }; + this.easeInternal = ()=>{ + newVect = easeMethod(); + trans.localPosition = newVect; + }; + return this; + } + + public LTDescr setMoveToTransform(){ + this.type = TweenAction.MOVE_TO_TRANSFORM; + this.initInternal = ()=>{ this.from = trans.position; }; + this.easeInternal = ()=>{ + this.to = this._optional.toTrans.position; + this.diff = this.to - this.from; + this.diffDiv2 = this.diff * 0.5f; + + newVect = easeMethod(); + this.trans.position = newVect; + }; + return this; + } + + public LTDescr setRotate(){ + this.type = TweenAction.ROTATE; + this.initInternal = ()=>{ this.from = trans.eulerAngles; this.to = new Vector3(LeanTween.closestRot( this.fromInternal.x, this.toInternal.x), LeanTween.closestRot( this.from.y, this.to.y), LeanTween.closestRot( this.from.z, this.to.z)); }; + this.easeInternal = ()=>{ + newVect = easeMethod(); + trans.eulerAngles = newVect; + }; + return this; + } + + public LTDescr setRotateLocal(){ + this.type = TweenAction.ROTATE_LOCAL; + this.initInternal = ()=>{ this.from = trans.localEulerAngles; this.to = new Vector3(LeanTween.closestRot( this.fromInternal.x, this.toInternal.x), LeanTween.closestRot( this.from.y, this.to.y), LeanTween.closestRot( this.from.z, this.to.z)); }; + this.easeInternal = ()=>{ + newVect = easeMethod(); + trans.localEulerAngles = newVect; + }; + return this; + } + + public LTDescr setScale(){ + this.type = TweenAction.SCALE; + this.initInternal = ()=>{ this.from = trans.localScale; }; + this.easeInternal = ()=>{ + newVect = easeMethod(); + trans.localScale = newVect; + }; + return this; + } + + public LTDescr setGUIMove(){ + this.type = TweenAction.GUI_MOVE; + this.initInternal = ()=>{ this.from = new Vector3(this._optional.ltRect.rect.x, this._optional.ltRect.rect.y, 0); }; + this.easeInternal = ()=>{ Vector3 v = easeMethod(); this._optional.ltRect.rect = new Rect( v.x, v.y, this._optional.ltRect.rect.width, this._optional.ltRect.rect.height); }; + return this; + } + + public LTDescr setGUIMoveMargin(){ + this.type = TweenAction.GUI_MOVE_MARGIN; + this.initInternal = ()=>{ this.from = new Vector2(this._optional.ltRect.margin.x, this._optional.ltRect.margin.y); }; + this.easeInternal = ()=>{ Vector3 v = easeMethod(); this._optional.ltRect.margin = new Vector2(v.x, v.y); }; + return this; + } + + public LTDescr setGUIScale(){ + this.type = TweenAction.GUI_SCALE; + this.initInternal = ()=>{ this.from = new Vector3(this._optional.ltRect.rect.width, this._optional.ltRect.rect.height, 0); }; + this.easeInternal = ()=>{ Vector3 v = easeMethod(); this._optional.ltRect.rect = new Rect( this._optional.ltRect.rect.x, this._optional.ltRect.rect.y, v.x, v.y); }; + return this; + } + + public LTDescr setGUIAlpha(){ + this.type = TweenAction.GUI_ALPHA; + this.initInternal = ()=>{ this.fromInternal.x = this._optional.ltRect.alpha; }; + this.easeInternal = ()=>{ this._optional.ltRect.alpha = easeMethod().x; }; + return this; + } + + public LTDescr setGUIRotate(){ + this.type = TweenAction.GUI_ROTATE; + this.initInternal = ()=>{ if(this._optional.ltRect.rotateEnabled==false){ + this._optional.ltRect.rotateEnabled = true; + this._optional.ltRect.resetForRotation(); + } + + this.fromInternal.x = this._optional.ltRect.rotation; + }; + this.easeInternal = ()=>{ this._optional.ltRect.rotation = easeMethod().x; }; + return this; + } + + public LTDescr setDelayedSound(){ + this.type = TweenAction.DELAYED_SOUND; + this.initInternal = ()=>{ this.hasExtraOnCompletes = true; }; + this.easeInternal = this.callback; + return this; + } + + private void init(){ + this.hasInitiliazed = true; + + usesNormalDt = !(useEstimatedTime || useManualTime || useFrames); // only set this to true if it uses non of the other timing modes + + if (useFrames) + this.optional.initFrameCount = Time.frameCount; + + if (this.time <= 0f) // avoid dividing by zero + this.time = Mathf.Epsilon; + + this.initInternal(); + + this.diff = this.to - this.from; + this.diffDiv2 = this.diff * 0.5f; + + if (this._optional.onStart != null) + this._optional.onStart(); + + if(this.onCompleteOnStart) + callOnCompletes(); + + if(this.speed>=0){ + initSpeed(); + } + } + + private void initSpeed(){ + if(this.type==TweenAction.MOVE_CURVED || this.type==TweenAction.MOVE_CURVED_LOCAL){ + this.time = this._optional.path.distance / this.speed; + }else if(this.type==TweenAction.MOVE_SPLINE || this.type==TweenAction.MOVE_SPLINE_LOCAL){ + this.time = this._optional.spline.distance/ this.speed; + }else{ + this.time = (this.to - this.from).magnitude / this.speed; + } + } + + public static float val; + public static float dt; + public static Vector3 newVect; + + /** + * If you need a tween to happen immediately instead of waiting for the next Update call, you can force it with this method + * + * @method updateNow + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * LeanTween.moveX(gameObject, 5f, 0f ).updateNow(); + */ + public LTDescr updateNow(){ + updateInternal(); + return this; + } + + public bool updateInternal(){ + + float directionLocal = this.direction; + if(this.usesNormalDt){ + dt = LeanTween.dtActual; + }else if( this.useEstimatedTime ){ + dt = LeanTween.dtEstimated; + }else if( this.useFrames ){ + dt = this.optional.initFrameCount==0 ? 0 : 1; + this.optional.initFrameCount = Time.frameCount; + }else if( this.useManualTime ){ + dt = LeanTween.dtManual; + } + +// Debug.Log ("tween:" + this+ " dt:"+dt); + if(this.delay<=0f && directionLocal!=0f){ + if(trans==null) + return true; + + // initialize if has not done so yet + if(!this.hasInitiliazed) + this.init(); + + dt = dt*directionLocal; + this.passed += dt; + + this.passed = Mathf.Clamp(this.passed, 0f, this.time); + + this.ratioPassed = (this.passed / this.time); // need to clamp when finished so it will finish at the exact spot and not overshoot + + this.easeInternal(); + + if(this.hasUpdateCallback) + this._optional.callOnUpdate(val, this.ratioPassed); + + bool isTweenFinished = directionLocal>0f ? this.passed>=this.time : this.passed<=0f; + // Debug.Log("lt "+this+" dt:"+dt+" fin:"+isTweenFinished); + if(isTweenFinished){ // increment or flip tween + this.loopCount--; + if(this.loopType==LeanTweenType.pingPong){ + this.direction = 0.0f-directionLocal; + }else{ + this.passed = Mathf.Epsilon; + } + + isTweenFinished = this.loopCount == 0 || this.loopType == LeanTweenType.once; // only return true if it is fully complete + + if(isTweenFinished==false && this.onCompleteOnRepeat && this.hasExtraOnCompletes) + callOnCompletes(); // this only gets called if onCompleteOnRepeat is set to true, otherwise LeanTween class takes care of calling it + + return isTweenFinished; + } + }else{ + this.delay -= dt; + } + + return false; + } + + public void callOnCompletes(){ + if(this.type==TweenAction.GUI_ROTATE) + this._optional.ltRect.rotateFinished = true; + + if(this.type==TweenAction.DELAYED_SOUND){ + AudioSource.PlayClipAtPoint((AudioClip)this._optional.onCompleteParam, this.to, this.from.x); + } + if(this._optional.onComplete!=null){ + this._optional.onComplete(); + }else if(this._optional.onCompleteObject!=null){ + this._optional.onCompleteObject(this._optional.onCompleteParam); + } + } + + // Helper Methods + + public LTDescr setFromColor( Color col ){ + this.from = new Vector3(0.0f, col.a, 0.0f); + this.diff = new Vector3(1.0f,0.0f,0.0f); + this._optional.axis = new Vector3( col.r, col.g, col.b ); + return this; + } + + private static void alphaRecursive( Transform transform, float val, bool useRecursion = true){ + Renderer renderer = transform.gameObject.GetComponent(); + if(renderer!=null){ + foreach(Material mat in renderer.materials){ + if(mat.HasProperty("_Color")){ + mat.color = new Color( mat.color.r, mat.color.g, mat.color.b, val); + }else if(mat.HasProperty("_TintColor")){ + Color col = mat.GetColor ("_TintColor"); + mat.SetColor("_TintColor", new Color( col.r, col.g, col.b, val)); + } + } + } + if(useRecursion && transform.childCount>0){ + foreach (Transform child in transform) { + alphaRecursive(child, val); + } + } + } + + private static void colorRecursive( Transform transform, Color toColor, bool useRecursion = true ){ + Renderer ren = transform.gameObject.GetComponent(); + if(ren!=null){ + foreach(Material mat in ren.materials){ + mat.color = toColor; + } + } + if(useRecursion && transform.childCount>0){ + foreach (Transform child in transform) { + colorRecursive(child, toColor); + } + } + } + + #if !UNITY_3_5 && !UNITY_4_0 && !UNITY_4_0_1 && !UNITY_4_1 && !UNITY_4_2 && !UNITY_4_3 && !UNITY_4_5 + + private static void alphaRecursive( RectTransform rectTransform, float val, int recursiveLevel = 0){ + if(rectTransform.childCount>0){ + foreach (RectTransform child in rectTransform) { + UnityEngine.UI.MaskableGraphic uiImage = child.GetComponent(); + if (uiImage != null) { + Color c = uiImage.color; c.a = val; uiImage.color = c; + } else { + uiImage = child.GetComponent(); + if (uiImage != null) { + Color c = uiImage.color; c.a = val; uiImage.color = c; + } + } + + alphaRecursive(child, val, recursiveLevel + 1); + } + } + } + + private static void alphaRecursiveSprite( Transform transform, float val ){ + if(transform.childCount>0){ + foreach (Transform child in transform) { + SpriteRenderer ren = child.GetComponent(); + if(ren!=null) + ren.color = new Color( ren.color.r, ren.color.g, ren.color.b, val); + alphaRecursiveSprite(child, val); + } + } + } + + private static void colorRecursiveSprite( Transform transform, Color toColor ){ + if(transform.childCount>0){ + foreach (Transform child in transform) { + SpriteRenderer ren = transform.gameObject.GetComponent(); + if(ren!=null) + ren.color = toColor; + colorRecursiveSprite(child, toColor); + } + } + } + + private static void colorRecursive( RectTransform rectTransform, Color toColor ){ + + if(rectTransform.childCount>0){ + foreach (RectTransform child in rectTransform) { + UnityEngine.UI.MaskableGraphic uiImage = child.GetComponent(); + if (uiImage != null) { + uiImage.color = toColor; + } else { + uiImage = child.GetComponent(); + if (uiImage != null) + uiImage.color = toColor; + } + colorRecursive(child, toColor); + } + } + } + + private static void textAlphaChildrenRecursive( Transform trans, float val, bool useRecursion = true ){ + + if(useRecursion && trans.childCount>0){ + foreach (Transform child in trans) { + UnityEngine.UI.Text uiText = child.GetComponent(); + if(uiText!=null){ + Color c = uiText.color; + c.a = val; + uiText.color = c; + } + textAlphaChildrenRecursive(child, val); + } + } + } + + private static void textAlphaRecursive( Transform trans, float val, bool useRecursion = true ){ + UnityEngine.UI.Text uiText = trans.GetComponent(); + if(uiText!=null){ + Color c = uiText.color; + c.a = val; + uiText.color = c; + } + if(useRecursion && trans.childCount>0){ + foreach (Transform child in trans) { + textAlphaRecursive(child, val); + } + } + } + + private static void textColorRecursive(Transform trans, Color toColor ){ + if(trans.childCount>0){ + foreach (Transform child in trans) { + UnityEngine.UI.Text uiText = child.GetComponent(); + if(uiText!=null){ + uiText.color = toColor; + } + textColorRecursive(child, toColor); + } + } + } + #endif + + private static Color tweenColor( LTDescr tween, float val ){ + Vector3 diff3 = tween._optional.point - tween._optional.axis; + float diffAlpha = tween.to.y - tween.from.y; + return new Color(tween._optional.axis.x + diff3.x*val, tween._optional.axis.y + diff3.y*val, tween._optional.axis.z + diff3.z*val, tween.from.y + diffAlpha*val); + } + + /** + * Pause a tween + * + * @method pause + * @return {LTDescr} LTDescr an object that distinguishes the tween + */ + public LTDescr pause(){ + if(this.direction != 0.0f){ // check if tween is already paused + this.directionLast = this.direction; + this.direction = 0.0f; + } + + return this; + } + + /** + * Resume a paused tween + * + * @method resume + * @return {LTDescr} LTDescr an object that distinguishes the tween + */ + public LTDescr resume(){ + this.direction = this.directionLast; + + return this; + } + + /** + * Set Axis optional axis for tweens where it is relevant + * + * @method setAxis + * @param {Vector3} axis either the tween rotates around, or the direction it faces in the case of setOrientToPath + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * LeanTween.move( ltLogo, path, 1.0f ).setEase(LeanTweenType.easeOutQuad).setOrientToPath(true).setAxis(Vector3.forward); + */ + public LTDescr setAxis( Vector3 axis ){ + this._optional.axis = axis; + return this; + } + + /** + * Delay the start of a tween + * + * @method setDelay + * @param {float} float time The time to complete the tween in + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * LeanTween.moveX(gameObject, 5f, 2.0f ).setDelay( 1.5f ); + */ + public LTDescr setDelay( float delay ){ + this.delay = delay; + + return this; + } + + /** + * Set the type of easing used for the tween.
    + * + * + * @method setEase + * @param {LeanTweenType} easeType:LeanTweenType the easing type to use + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * LeanTween.moveX(gameObject, 5f, 2.0f ).setEase( LeanTweenType.easeInBounce ); + */ + public LTDescr setEase( LeanTweenType easeType ){ + + switch( easeType ){ + case LeanTweenType.linear: + setEaseLinear(); break; + case LeanTweenType.easeOutQuad: + setEaseOutQuad(); break; + case LeanTweenType.easeInQuad: + setEaseInQuad(); break; + case LeanTweenType.easeInOutQuad: + setEaseInOutQuad(); break; + case LeanTweenType.easeInCubic: + setEaseInCubic();break; + case LeanTweenType.easeOutCubic: + setEaseOutCubic(); break; + case LeanTweenType.easeInOutCubic: + setEaseInOutCubic(); break; + case LeanTweenType.easeInQuart: + setEaseInQuart(); break; + case LeanTweenType.easeOutQuart: + setEaseOutQuart(); break; + case LeanTweenType.easeInOutQuart: + setEaseInOutQuart(); break; + case LeanTweenType.easeInQuint: + setEaseInQuint(); break; + case LeanTweenType.easeOutQuint: + setEaseOutQuint(); break; + case LeanTweenType.easeInOutQuint: + setEaseInOutQuint(); break; + case LeanTweenType.easeInSine: + setEaseInSine(); break; + case LeanTweenType.easeOutSine: + setEaseOutSine(); break; + case LeanTweenType.easeInOutSine: + setEaseInOutSine(); break; + case LeanTweenType.easeInExpo: + setEaseInExpo(); break; + case LeanTweenType.easeOutExpo: + setEaseOutExpo(); break; + case LeanTweenType.easeInOutExpo: + setEaseInOutExpo(); break; + case LeanTweenType.easeInCirc: + setEaseInCirc(); break; + case LeanTweenType.easeOutCirc: + setEaseOutCirc(); break; + case LeanTweenType.easeInOutCirc: + setEaseInOutCirc(); break; + case LeanTweenType.easeInBounce: + setEaseInBounce(); break; + case LeanTweenType.easeOutBounce: + setEaseOutBounce(); break; + case LeanTweenType.easeInOutBounce: + setEaseInOutBounce(); break; + case LeanTweenType.easeInBack: + setEaseInBack(); break; + case LeanTweenType.easeOutBack: + setEaseOutBack(); break; + case LeanTweenType.easeInOutBack: + setEaseInOutBack(); break; + case LeanTweenType.easeInElastic: + setEaseInElastic(); break; + case LeanTweenType.easeOutElastic: + setEaseOutElastic(); break; + case LeanTweenType.easeInOutElastic: + setEaseInOutElastic(); break; + case LeanTweenType.punch: + setEasePunch(); break; + case LeanTweenType.easeShake: + setEaseShake(); break; + case LeanTweenType.easeSpring: + setEaseSpring(); break; + default: + setEaseLinear(); break; + } + + return this; + } + + public LTDescr setEaseLinear(){ this.easeType = LeanTweenType.linear; this.easeMethod = this.easeLinear; return this; } + + public LTDescr setEaseSpring(){ this.easeType = LeanTweenType.easeSpring; this.easeMethod = this.easeSpring; return this; } + + public LTDescr setEaseInQuad(){ this.easeType = LeanTweenType.easeInQuad; this.easeMethod = this.easeInQuad; return this; } + + public LTDescr setEaseOutQuad(){ this.easeType = LeanTweenType.easeOutQuad; this.easeMethod = this.easeOutQuad; return this; } + + public LTDescr setEaseInOutQuad(){ this.easeType = LeanTweenType.easeInOutQuad; this.easeMethod = this.easeInOutQuad; return this;} + + public LTDescr setEaseInCubic(){ this.easeType = LeanTweenType.easeInCubic; this.easeMethod = this.easeInCubic; return this; } + + public LTDescr setEaseOutCubic(){ this.easeType = LeanTweenType.easeOutCubic; this.easeMethod = this.easeOutCubic; return this; } + + public LTDescr setEaseInOutCubic(){ this.easeType = LeanTweenType.easeInOutCubic; this.easeMethod = this.easeInOutCubic; return this; } + + public LTDescr setEaseInQuart(){ this.easeType = LeanTweenType.easeInQuart; this.easeMethod = this.easeInQuart; return this; } + + public LTDescr setEaseOutQuart(){ this.easeType = LeanTweenType.easeOutQuart; this.easeMethod = this.easeOutQuart; return this; } + + public LTDescr setEaseInOutQuart(){ this.easeType = LeanTweenType.easeInOutQuart; this.easeMethod = this.easeInOutQuart; return this; } + + public LTDescr setEaseInQuint(){ this.easeType = LeanTweenType.easeInQuint; this.easeMethod = this.easeInQuint; return this; } + + public LTDescr setEaseOutQuint(){ this.easeType = LeanTweenType.easeOutQuint; this.easeMethod = this.easeOutQuint; return this; } + + public LTDescr setEaseInOutQuint(){ this.easeType = LeanTweenType.easeInOutQuint; this.easeMethod = this.easeInOutQuint; return this; } + + public LTDescr setEaseInSine(){ this.easeType = LeanTweenType.easeInSine; this.easeMethod = this.easeInSine; return this; } + + public LTDescr setEaseOutSine(){ this.easeType = LeanTweenType.easeOutSine; this.easeMethod = this.easeOutSine; return this; } + + public LTDescr setEaseInOutSine(){ this.easeType = LeanTweenType.easeInOutSine; this.easeMethod = this.easeInOutSine; return this; } + + public LTDescr setEaseInExpo(){ this.easeType = LeanTweenType.easeInExpo; this.easeMethod = this.easeInExpo; return this; } + + public LTDescr setEaseOutExpo(){ this.easeType = LeanTweenType.easeOutExpo; this.easeMethod = this.easeOutExpo; return this; } + + public LTDescr setEaseInOutExpo(){ this.easeType = LeanTweenType.easeInOutExpo; this.easeMethod = this.easeInOutExpo; return this; } + + public LTDescr setEaseInCirc(){ this.easeType = LeanTweenType.easeInCirc; this.easeMethod = this.easeInCirc; return this; } + + public LTDescr setEaseOutCirc(){ this.easeType = LeanTweenType.easeOutCirc; this.easeMethod = this.easeOutCirc; return this; } + + public LTDescr setEaseInOutCirc(){ this.easeType = LeanTweenType.easeInOutCirc; this.easeMethod = this.easeInOutCirc; return this; } + + public LTDescr setEaseInBounce(){ this.easeType = LeanTweenType.easeInBounce; this.easeMethod = this.easeInBounce; return this; } + + public LTDescr setEaseOutBounce(){ this.easeType = LeanTweenType.easeOutBounce; this.easeMethod = this.easeOutBounce; return this; } + + public LTDescr setEaseInOutBounce(){ this.easeType = LeanTweenType.easeInOutBounce; this.easeMethod = this.easeInOutBounce; return this; } + + public LTDescr setEaseInBack(){ this.easeType = LeanTweenType.easeInBack; this.easeMethod = this.easeInBack; return this; } + + public LTDescr setEaseOutBack(){ this.easeType = LeanTweenType.easeOutBack; this.easeMethod = this.easeOutBack; return this; } + + public LTDescr setEaseInOutBack(){ this.easeType = LeanTweenType.easeInOutBack; this.easeMethod = this.easeInOutBack; return this; } + + public LTDescr setEaseInElastic(){ this.easeType = LeanTweenType.easeInElastic; this.easeMethod = this.easeInElastic; return this; } + + public LTDescr setEaseOutElastic(){ this.easeType = LeanTweenType.easeOutElastic; this.easeMethod = this.easeOutElastic; return this; } + + public LTDescr setEaseInOutElastic(){ this.easeType = LeanTweenType.easeInOutElastic; this.easeMethod = this.easeInOutElastic; return this; } + + public LTDescr setEasePunch(){ this._optional.animationCurve = LeanTween.punch; this.toInternal.x = this.from.x + this.to.x; this.easeMethod = this.tweenOnCurve; return this; } + + public LTDescr setEaseShake(){ this._optional.animationCurve = LeanTween.shake; this.toInternal.x = this.from.x + this.to.x; this.easeMethod = this.tweenOnCurve; return this; } + + private Vector3 tweenOnCurve(){ + return new Vector3(this.from.x + (this.diff.x) * this._optional.animationCurve.Evaluate(ratioPassed), + this.from.y + (this.diff.y) * this._optional.animationCurve.Evaluate(ratioPassed), + this.from.z + (this.diff.z) * this._optional.animationCurve.Evaluate(ratioPassed) ); + } + + // Vector3 Ease Methods + + private Vector3 easeInOutQuad(){ + val = this.ratioPassed * 2f; + + if (val < 1f) { + val = val * val; + return new Vector3( this.diffDiv2.x * val + this.from.x, this.diffDiv2.y * val + this.from.y, this.diffDiv2.z * val + this.from.z); + } + val = (1f-val) * (val - 3f) + 1f; + return new Vector3( this.diffDiv2.x * val + this.from.x, this.diffDiv2.y * val + this.from.y, this.diffDiv2.z * val + this.from.z); + } + + private Vector3 easeInQuad(){ + val = ratioPassed * ratioPassed; + return new Vector3(this.diff.x * val + this.from.x, this.diff.y * val + this.from.y, this.diff.z * val + this.from.z); + } + + private Vector3 easeOutQuad(){ + val = this.ratioPassed; + val = -val * (val - 2f); + return (this.diff * val + this.from); + } + + private Vector3 easeLinear(){ + val = this.ratioPassed; + return new Vector3(this.from.x+this.diff.x*val, this.from.y+this.diff.y*val, this.from.z+this.diff.z*val); + } + + private Vector3 easeSpring(){ + val = Mathf.Clamp01(this.ratioPassed); + val = (Mathf.Sin(val * Mathf.PI * (0.2f + 2.5f * val * val * val)) * Mathf.Pow(1f - val, 2.2f ) + val) * (1f + (1.2f * (1f - val) )); + return this.from + this.diff * val; + } + + private Vector3 easeInCubic(){ + val = this.ratioPassed * this.ratioPassed * this.ratioPassed; + return new Vector3(this.diff.x * val + this.from.x, this.diff.y * val + this.from.y, this.diff.z * val + this.from.z); + } + + private Vector3 easeOutCubic(){ + val = this.ratioPassed - 1f; + val = (val * val * val + 1); + return new Vector3( this.diff.x * val + this.from.x, this.diff.y * val + this.from.y, this.diff.z * val + this.from.z) ; + } + + private Vector3 easeInOutCubic(){ + val = this.ratioPassed * 2f; + if (val < 1f) { + val = val * val * val; + return new Vector3(this.diffDiv2.x * val + this.from.x, this.diffDiv2.y * val + this.from.y, this.diffDiv2.z * val + this.from.z); + } + val -= 2f; + val = val * val * val + 2f; + return new Vector3(this.diffDiv2.x * val + this.from.x, this.diffDiv2.y * val + this.from.y,this.diffDiv2.z * val + this.from.z); + } + + private Vector3 easeInQuart(){ + val = this.ratioPassed * this.ratioPassed * this.ratioPassed * this.ratioPassed; + return diff * val + this.from; + } + + private Vector3 easeOutQuart(){ + val = this.ratioPassed - 1f; + val = -(val * val * val * val - 1); + return new Vector3(this.diff.x * val + this.from.x, this.diff.y * val + this.from.y,this.diff.z * val + this.from.z); + } + + private Vector3 easeInOutQuart(){ + val = this.ratioPassed * 2f; + if (val < 1f) { + val = val * val * val * val; + return new Vector3(this.diffDiv2.x * val + this.from.x, this.diffDiv2.y * val + this.from.y, this.diffDiv2.z * val + this.from.z); + } + val -= 2f; +// val = (val * val * val * val - 2f); + return -this.diffDiv2 * (val * val * val * val - 2f) + this.from; + } + + private Vector3 easeInQuint(){ + val = this.ratioPassed; + val = val * val * val * val * val; + return new Vector3(this.diff.x * val + this.from.x, this.diff.y * val + this.from.y, this.diff.z * val + this.from.z); + } + + private Vector3 easeOutQuint(){ + val = this.ratioPassed - 1f; + val = (val * val * val * val * val + 1f); + return new Vector3(this.diff.x * val + this.from.x, this.diff.y * val + this.from.y, this.diff.z * val + this.from.z); + } + + private Vector3 easeInOutQuint(){ + val = this.ratioPassed * 2f; + if (val < 1f){ + val = val * val * val * val * val; + return new Vector3(this.diffDiv2.x * val + this.from.x,this.diffDiv2.y * val + this.from.y,this.diffDiv2.z * val + this.from.z); + } + val -= 2f; + val = (val * val * val * val * val + 2f); + return new Vector3(this.diffDiv2.x * val + this.from.x, this.diffDiv2.y * val + this.from.y, this.diffDiv2.z * val + this.from.z); + } + + private Vector3 easeInSine(){ + val = - Mathf.Cos(this.ratioPassed * LeanTween.PI_DIV2); + return new Vector3(this.diff.x * val + this.diff.x + this.from.x, this.diff.y * val + this.diff.y + this.from.y, this.diff.z * val + this.diff.z + this.from.z); + } + + private Vector3 easeOutSine(){ + val = Mathf.Sin(this.ratioPassed * LeanTween.PI_DIV2); + return new Vector3(this.diff.x * val + this.from.x, this.diff.y * val + this.from.y,this.diff.z * val + this.from.z); + } + + private Vector3 easeInOutSine(){ + val = -(Mathf.Cos(Mathf.PI * this.ratioPassed) - 1f); + return new Vector3(this.diffDiv2.x * val + this.from.x, this.diffDiv2.y * val + this.from.y, this.diffDiv2.z * val + this.from.z); + } + + private Vector3 easeInExpo(){ + val = Mathf.Pow(2f, 10f * (this.ratioPassed - 1f)); + return new Vector3(this.diff.x * val + this.from.x, this.diff.y * val + this.from.y, this.diff.z * val + this.from.z); + } + + private Vector3 easeOutExpo(){ + val = (-Mathf.Pow(2f, -10f * this.ratioPassed) + 1f); + return new Vector3(this.diff.x * val + this.from.x, this.diff.y * val + this.from.y, this.diff.z * val + this.from.z); + } + + private Vector3 easeInOutExpo(){ + val = this.ratioPassed * 2f; + if (val < 1) return this.diffDiv2 * Mathf.Pow(2, 10 * (val - 1)) + this.from; + val--; + return this.diffDiv2 * (-Mathf.Pow(2, -10 * val) + 2) + this.from; + } + + private Vector3 easeInCirc(){ + val = -(Mathf.Sqrt(1f - this.ratioPassed * this.ratioPassed) - 1f); + return new Vector3(this.diff.x * val + this.from.x, this.diff.y * val + this.from.y, this.diff.z * val + this.from.z); + } + + private Vector3 easeOutCirc(){ + val = this.ratioPassed - 1f; + val = Mathf.Sqrt(1f - val * val); + + return new Vector3(this.diff.x * val + this.from.x, this.diff.y * val + this.from.y, this.diff.z * val + this.from.z); + } + + private Vector3 easeInOutCirc(){ + val = this.ratioPassed * 2f; + if (val < 1f){ + val = -(Mathf.Sqrt(1f - val * val) - 1f); + return new Vector3(this.diffDiv2.x * val + this.from.x, this.diffDiv2.y * val + this.from.y, this.diffDiv2.z * val + this.from.z); + } + val -= 2f; + val = (Mathf.Sqrt(1f - val * val) + 1f); + return new Vector3(this.diffDiv2.x * val + this.from.x, this.diffDiv2.y * val + this.from.y, this.diffDiv2.z * val + this.from.z); + } + + private Vector3 easeInBounce(){ + val = this.ratioPassed; + val = 1f - val; + return new Vector3(this.diff.x - LeanTween.easeOutBounce(0, this.diff.x, val) + this.from.x, + this.diff.y - LeanTween.easeOutBounce(0, this.diff.y, val) + this.from.y, + this.diff.z - LeanTween.easeOutBounce(0, this.diff.z, val) + this.from.z); + } + + private Vector3 easeOutBounce () + { + val = ratioPassed; + float valM, valN; // bounce values + if (val < (valM = 1 - 1.75f * this.overshoot / 2.75f)) { + val = 1 / valM / valM * val * val; + } else if (val < (valN = 1 - .75f * this.overshoot / 2.75f)) { + val -= (valM + valN) / 2; + // first bounce, height: 1/4 + val = 7.5625f * val * val + 1 - .25f * this.overshoot * this.overshoot; + } else if (val < (valM = 1 - .25f * this.overshoot / 2.75f)) { + val -= (valM + valN) / 2; + // second bounce, height: 1/16 + val = 7.5625f * val * val + 1 - .0625f * this.overshoot * this.overshoot; + } else { // valN = 1 + val -= (valM + 1) / 2; + // third bounce, height: 1/64 + val = 7.5625f * val * val + 1 - .015625f * this.overshoot * this.overshoot; + } + return this.diff * val + this.from; + } + + private Vector3 easeInOutBounce(){ + val = this.ratioPassed * 2f; + if (val < 1f){ + return new Vector3(LeanTween.easeInBounce(0, this.diff.x, val) * 0.5f + this.from.x, + LeanTween.easeInBounce(0, this.diff.y, val) * 0.5f + this.from.y, + LeanTween.easeInBounce(0, this.diff.z, val) * 0.5f + this.from.z); + }else { + val = val - 1f; + return new Vector3(LeanTween.easeOutBounce(0, this.diff.x, val) * 0.5f + this.diffDiv2.x + this.from.x, + LeanTween.easeOutBounce(0, this.diff.y, val) * 0.5f + this.diffDiv2.y + this.from.y, + LeanTween.easeOutBounce(0, this.diff.z, val) * 0.5f + this.diffDiv2.z + this.from.z); + } + } + + private Vector3 easeInBack(){ + val = this.ratioPassed; + val /= 1; + float s = 1.70158f * this.overshoot; + return this.diff * (val) * val * ((s + 1) * val - s) + this.from; + } + + private Vector3 easeOutBack(){ + float s = 1.70158f * this.overshoot; + val = (this.ratioPassed / 1) - 1; + val = ((val) * val * ((s + 1) * val + s) + 1); + return this.diff * val + this.from; + } + + private Vector3 easeInOutBack(){ + float s = 1.70158f * this.overshoot; + val = this.ratioPassed * 2f; + if ((val) < 1){ + s *= (1.525f) * overshoot; + return this.diffDiv2 * (val * val * (((s) + 1) * val - s)) + this.from; + } + val -= 2; + s *= (1.525f) * overshoot; + val = ((val) * val * (((s) + 1) * val + s) + 2); + return this.diffDiv2 * val + this.from; + } + + private Vector3 easeInElastic(){ + return new Vector3(LeanTween.easeInElastic(this.from.x,this.to.x,this.ratioPassed,this.overshoot,this.period), + LeanTween.easeInElastic(this.from.y,this.to.y,this.ratioPassed,this.overshoot,this.period), + LeanTween.easeInElastic(this.from.z,this.to.z,this.ratioPassed,this.overshoot,this.period)); + } + + private Vector3 easeOutElastic(){ + return new Vector3(LeanTween.easeOutElastic(this.from.x,this.to.x,this.ratioPassed,this.overshoot,this.period), + LeanTween.easeOutElastic(this.from.y,this.to.y,this.ratioPassed,this.overshoot,this.period), + LeanTween.easeOutElastic(this.from.z,this.to.z,this.ratioPassed,this.overshoot,this.period)); + } + + private Vector3 easeInOutElastic() + { + return new Vector3(LeanTween.easeInOutElastic(this.from.x,this.to.x,this.ratioPassed,this.overshoot,this.period), + LeanTween.easeInOutElastic(this.from.y,this.to.y,this.ratioPassed,this.overshoot,this.period), + LeanTween.easeInOutElastic(this.from.z,this.to.z,this.ratioPassed,this.overshoot,this.period)); + } + + /** + * Set how far past a tween will overshoot for certain ease types (compatible: easeInBack, easeInOutBack, easeOutBack, easeOutElastic, easeInElastic, easeInOutElastic).
    + * @method setOvershoot + * @param {float} overshoot:float how far past the destination it will go before settling in + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * LeanTween.moveX(gameObject, 5f, 2.0f ).setEase( LeanTweenType.easeOutBack ).setOvershoot(2f); + */ + public LTDescr setOvershoot( float overshoot ){ + this.overshoot = overshoot; + return this; + } + + /** + * Set how short the iterations are for certain ease types (compatible: easeOutElastic, easeInElastic, easeInOutElastic).
    + * @method setPeriod + * @param {float} period:float how short the iterations are that the tween will animate at (default 0.3f) + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * LeanTween.moveX(gameObject, 5f, 2.0f ).setEase( LeanTweenType.easeOutElastic ).setPeriod(0.3f); + */ + public LTDescr setPeriod( float period ){ + this.period = period; + return this; + } + + /** + * Set how large the effect is for certain ease types (compatible: punch, shake, animation curves).
    + * @method setScale + * @param {float} scale:float how much the ease will be multiplied by (default 1f) + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * LeanTween.moveX(gameObject, 5f, 2.0f ).setEase( LeanTweenType.punch ).setScale(2f); + */ + public LTDescr setScale( float scale ){ + this.scale = scale; + return this; + } + + /** + * Set the type of easing used for the tween with a custom curve.
    + * @method setEase (AnimationCurve) + * @param {AnimationCurve} easeDefinition:AnimationCurve an AnimationCure that describes the type of easing you want, this is great for when you want a unique type of movement + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * LeanTween.moveX(gameObject, 5f, 2.0f ).setEase( LeanTweenType.easeInBounce ); + */ + public LTDescr setEase( AnimationCurve easeCurve ){ + this._optional.animationCurve = easeCurve; + this.easeMethod = this.tweenOnCurve; + this.easeType = LeanTweenType.animationCurve; + return this; + } + + /** + * Set the end that the GameObject is tweening towards + * @method setTo + * @param {Vector3} to:Vector3 point at which you want the tween to reach + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * LTDescr descr = LeanTween.move( cube, Vector3.up, new Vector3(1f,3f,0f), 1.0f ).setEase( LeanTweenType.easeInOutBounce );
    + * // Later your want to change your destination or your destiation is constantly moving
    + * descr.setTo( new Vector3(5f,10f,3f) );
    + */ + public LTDescr setTo( Vector3 to ){ + if(this.hasInitiliazed){ + this.to = to; + this.diff = to - this.from; + }else{ + this.to = to; + } + + return this; + } + + public LTDescr setTo( Transform to ){ + this._optional.toTrans = to; + return this; + } + + /** + * Set the beginning of the tween + * @method setFrom + * @param {Vector3} from:Vector3 the point you would like the tween to start at + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * LTDescr descr = LeanTween.move( cube, Vector3.up, new Vector3(1f,3f,0f), 1.0f ).setFrom( new Vector3(5f,10f,3f) );
    + */ + public LTDescr setFrom( Vector3 from ){ + if(this.trans){ + this.init(); + } + this.from = from; + // this.hasInitiliazed = true; // this is set, so that the "from" value isn't overwritten later on when the tween starts + this.diff = this.to - this.from; + this.diffDiv2 = this.diff * 0.5f; + return this; + } + + public LTDescr setFrom( float from ){ + return setFrom( new Vector3(from, 0f, 0f) ); + } + + public LTDescr setDiff( Vector3 diff ){ + this.diff = diff; + return this; + } + + public LTDescr setHasInitialized( bool has ){ + this.hasInitiliazed = has; + return this; + } + + public LTDescr setId( uint id, uint global_counter ){ + this._id = id; + this.counter = global_counter; + // Debug.Log("Global counter:"+global_counter); + return this; + } + + /** + * Set the point of time the tween will start in + * @method setPassed + * @param {float} passedTime:float the length of time in seconds the tween will start in + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * int tweenId = LeanTween.moveX(gameObject, 5f, 2.0f ).id;
    + * // Later
    + * LTDescr descr = description( tweenId );
    + * descr.setPassed( 1f );
    + */ + public LTDescr setPassed( float passed ){ + this.passed = passed; + return this; + } + + /** + * Set the finish time of the tween + * @method setTime + * @param {float} finishTime:float the length of time in seconds you wish the tween to complete in + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * int tweenId = LeanTween.moveX(gameObject, 5f, 2.0f ).id;
    + * // Later
    + * LTDescr descr = description( tweenId );
    + * descr.setTime( 1f );
    + */ + public LTDescr setTime( float time ){ + float passedTimeRatio = this.passed / this.time; + this.passed = time * passedTimeRatio; + this.time = time; + return this; + } + + /** + * Set the finish time of the tween + * @method setSpeed + * @param {float} speed:float the speed in unity units per second you wish the object to travel (overrides the given time) + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * LeanTween.moveLocalZ( gameObject, 10f, 1f).setSpeed(0.2f) // the given time is ignored when speed is set
    + */ + public LTDescr setSpeed( float speed ){ + this.speed = speed; + if(this.hasInitiliazed) + initSpeed(); + return this; + } + + /** + * Set the tween to repeat a number of times. + * @method setRepeat + * @param {int} repeatNum:int the number of times to repeat the tween. -1 to repeat infinite times + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * LeanTween.moveX(gameObject, 5f, 2.0f ).setRepeat( 10 ).setLoopPingPong(); + */ + public LTDescr setRepeat( int repeat ){ + this.loopCount = repeat; + if((repeat>1 && this.loopType == LeanTweenType.once) || (repeat < 0 && this.loopType == LeanTweenType.once)){ + this.loopType = LeanTweenType.clamp; + } + if(this.type==TweenAction.CALLBACK || this.type==TweenAction.CALLBACK_COLOR){ + this.setOnCompleteOnRepeat(true); + } + return this; + } + + public LTDescr setLoopType( LeanTweenType loopType ){ + this.loopType = loopType; + return this; + } + + public LTDescr setUseEstimatedTime( bool useEstimatedTime ){ + this.useEstimatedTime = useEstimatedTime; + this.usesNormalDt = false; + return this; + } + + /** + * Set ignore time scale when tweening an object when you want the animation to be time-scale independent (ignores the Time.timeScale value). Great for pause screens, when you want all other action to be stopped (or slowed down) + * @method setIgnoreTimeScale + * @param {bool} useUnScaledTime:bool whether to use the unscaled time or not + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * LeanTween.moveX(gameObject, 5f, 2.0f ).setRepeat( 2 ).setIgnoreTimeScale( true ); + */ + public LTDescr setIgnoreTimeScale( bool useUnScaledTime ){ + this.useEstimatedTime = useUnScaledTime; + this.usesNormalDt = false; + return this; + } + + /** + * Use frames when tweening an object, when you don't want the animation to be time-frame independent... + * @method setUseFrames + * @param {bool} useFrames:bool whether to use estimated time or not + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * LeanTween.moveX(gameObject, 5f, 2.0f ).setRepeat( 2 ).setUseFrames( true ); + */ + public LTDescr setUseFrames( bool useFrames ){ + this.useFrames = useFrames; + this.usesNormalDt = false; + return this; + } + + public LTDescr setUseManualTime( bool useManualTime ){ + this.useManualTime = useManualTime; + this.usesNormalDt = false; + return this; + } + + public LTDescr setLoopCount( int loopCount ){ + this.loopType = LeanTweenType.clamp; + this.loopCount = loopCount; + return this; + } + + /** + * No looping involved, just run once (the default) + * @method setLoopOnce + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * LeanTween.moveX(gameObject, 5f, 2.0f ).setLoopOnce(); + */ + public LTDescr setLoopOnce(){ this.loopType = LeanTweenType.once; return this; } + + /** + * When the animation gets to the end it starts back at where it began + * @method setLoopClamp + * @param {int} loops:int (defaults to -1) how many times you want the loop to happen (-1 for an infinite number of times) + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * LeanTween.moveX(gameObject, 5f, 2.0f ).setLoopClamp( 2 ); + */ + public LTDescr setLoopClamp(){ + this.loopType = LeanTweenType.clamp; + if(this.loopCount==0) + this.loopCount = -1; + return this; + } + public LTDescr setLoopClamp( int loops ){ + this.loopCount = loops; + return this; + } + + /** + * When the animation gets to the end it then tweens back to where it started (and on, and on) + * @method setLoopPingPong + * @param {int} loops:int (defaults to -1) how many times you want the loop to happen in both directions (-1 for an infinite number of times). Passing a value of 1 will cause the object to go towards and back from it's destination once. + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * LeanTween.moveX(gameObject, 5f, 2.0f ).setLoopPingPong( 2 ); + */ + public LTDescr setLoopPingPong(){ + this.loopType = LeanTweenType.pingPong; + if(this.loopCount==0) + this.loopCount = -1; + return this; + } + public LTDescr setLoopPingPong( int loops ) { + this.loopType = LeanTweenType.pingPong; + this.loopCount = loops == -1 ? loops : loops * 2; + return this; + } + + /** + * Have a method called when the tween finishes + * @method setOnComplete + * @param {Action} onComplete:Action the method that should be called when the tween is finished ex: tweenFinished(){ } + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * LeanTween.moveX(gameObject, 5f, 2.0f ).setOnComplete( tweenFinished ); + */ + public LTDescr setOnComplete( Action onComplete ){ + this._optional.onComplete = onComplete; + this.hasExtraOnCompletes = true; + return this; + } + + /** + * Have a method called when the tween finishes + * @method setOnComplete (object) + * @param {Action} onComplete:Action the method that should be called when the tween is finished ex: tweenFinished( object myObj ){ } + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * object tweenFinishedObj = "hi" as object; + * LeanTween.moveX(gameObject, 5f, 2.0f ).setOnComplete( tweenFinished, tweenFinishedObj ); + */ + public LTDescr setOnComplete( Action onComplete ){ + this._optional.onCompleteObject = onComplete; + this.hasExtraOnCompletes = true; + return this; + } + public LTDescr setOnComplete( Action onComplete, object onCompleteParam ){ + this._optional.onCompleteObject = onComplete; + this.hasExtraOnCompletes = true; + if(onCompleteParam!=null) + this._optional.onCompleteParam = onCompleteParam; + return this; + } + + /** + * Pass an object to along with the onComplete Function + * @method setOnCompleteParam + * @param {object} onComplete:object an object that + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * LeanTween.delayedCall(1.5f, enterMiniGameStart).setOnCompleteParam( new object[]{""+5} );

    + * void enterMiniGameStart( object val ){
    + *  object[] arr = (object [])val;
    + *  int lvl = int.Parse((string)arr[0]);
    + * }
    + */ + public LTDescr setOnCompleteParam( object onCompleteParam ){ + this._optional.onCompleteParam = onCompleteParam; + this.hasExtraOnCompletes = true; + return this; + } + + + /** + * Have a method called on each frame that the tween is being animated (passes a float value) + * @method setOnUpdate + * @param {Action} onUpdate:Action a method that will be called on every frame with the float value of the tweened object + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * LeanTween.moveX(gameObject, 5f, 2.0f ).setOnUpdate( tweenMoved );
    + *
    + * void tweenMoved( float val ){ }
    + */ + public LTDescr setOnUpdate( Action onUpdate ){ + this._optional.onUpdateFloat = onUpdate; + this.hasUpdateCallback = true; + return this; + } + public LTDescr setOnUpdateRatio(Action onUpdate) + { + this._optional.onUpdateFloatRatio = onUpdate; + this.hasUpdateCallback = true; + return this; + } + + public LTDescr setOnUpdateObject( Action onUpdate ){ + this._optional.onUpdateFloatObject = onUpdate; + this.hasUpdateCallback = true; + return this; + } + public LTDescr setOnUpdateVector2( Action onUpdate ){ + this._optional.onUpdateVector2 = onUpdate; + this.hasUpdateCallback = true; + return this; + } + public LTDescr setOnUpdateVector3( Action onUpdate ){ + this._optional.onUpdateVector3 = onUpdate; + this.hasUpdateCallback = true; + return this; + } + public LTDescr setOnUpdateColor( Action onUpdate ){ + this._optional.onUpdateColor = onUpdate; + this.hasUpdateCallback = true; + return this; + } + public LTDescr setOnUpdateColor( Action onUpdate ){ + this._optional.onUpdateColorObject = onUpdate; + this.hasUpdateCallback = true; + return this; + } + + #if !UNITY_FLASH + + public LTDescr setOnUpdate( Action onUpdate ){ + this._optional.onUpdateColor = onUpdate; + this.hasUpdateCallback = true; + return this; + } + + public LTDescr setOnUpdate( Action onUpdate ){ + this._optional.onUpdateColorObject = onUpdate; + this.hasUpdateCallback = true; + return this; + } + + /** + * Have a method called on each frame that the tween is being animated (passes a float value and a object) + * @method setOnUpdate (object) + * @param {Action} onUpdate:Action a method that will be called on every frame with the float value of the tweened object, and an object of the person's choosing + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * LeanTween.moveX(gameObject, 5f, 2.0f ).setOnUpdate( tweenMoved ).setOnUpdateParam( myObject );
    + *
    + * void tweenMoved( float val, object obj ){ }
    + */ + public LTDescr setOnUpdate( Action onUpdate, object onUpdateParam = null ){ + this._optional.onUpdateFloatObject = onUpdate; + this.hasUpdateCallback = true; + if(onUpdateParam!=null) + this._optional.onUpdateParam = onUpdateParam; + return this; + } + + public LTDescr setOnUpdate( Action onUpdate, object onUpdateParam = null ){ + this._optional.onUpdateVector3Object = onUpdate; + this.hasUpdateCallback = true; + if(onUpdateParam!=null) + this._optional.onUpdateParam = onUpdateParam; + return this; + } + + public LTDescr setOnUpdate( Action onUpdate, object onUpdateParam = null ){ + this._optional.onUpdateVector2 = onUpdate; + this.hasUpdateCallback = true; + if(onUpdateParam!=null) + this._optional.onUpdateParam = onUpdateParam; + return this; + } + + /** + * Have a method called on each frame that the tween is being animated (passes a float value) + * @method setOnUpdate (Vector3) + * @param {Action} onUpdate:Action a method that will be called on every frame with the float value of the tweened object + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * LeanTween.moveX(gameObject, 5f, 2.0f ).setOnUpdate( tweenMoved );
    + *
    + * void tweenMoved( Vector3 val ){ }
    + */ + public LTDescr setOnUpdate( Action onUpdate, object onUpdateParam = null ){ + this._optional.onUpdateVector3 = onUpdate; + this.hasUpdateCallback = true; + if(onUpdateParam!=null) + this._optional.onUpdateParam = onUpdateParam; + return this; + } + #endif + + + /** + * Have an object passed along with the onUpdate method + * @method setOnUpdateParam + * @param {object} onUpdateParam:object an object that will be passed along with the onUpdate method + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * LeanTween.moveX(gameObject, 5f, 2.0f ).setOnUpdate( tweenMoved ).setOnUpdateParam( myObject );
    + *
    + * void tweenMoved( float val, object obj ){ }
    + */ + public LTDescr setOnUpdateParam( object onUpdateParam ){ + this._optional.onUpdateParam = onUpdateParam; + return this; + } + + /** + * While tweening along a curve, set this property to true, to be perpendicalur to the path it is moving upon + * @method setOrientToPath + * @param {bool} doesOrient:bool whether the gameobject will orient to the path it is animating along + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * LeanTween.move( ltLogo, path, 1.0f ).setEase(LeanTweenType.easeOutQuad).setOrientToPath(true).setAxis(Vector3.forward);
    + */ + public LTDescr setOrientToPath( bool doesOrient ){ + if(this.type==TweenAction.MOVE_CURVED || this.type==TweenAction.MOVE_CURVED_LOCAL){ + if(this._optional.path==null) + this._optional.path = new LTBezierPath(); + this._optional.path.orientToPath = doesOrient; + }else{ + this._optional.spline.orientToPath = doesOrient; + } + return this; + } + + /** + * While tweening along a curve, set this property to true, to be perpendicalur to the path it is moving upon + * @method setOrientToPath2d + * @param {bool} doesOrient:bool whether the gameobject will orient to the path it is animating along + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * LeanTween.move( ltLogo, path, 1.0f ).setEase(LeanTweenType.easeOutQuad).setOrientToPath2d(true).setAxis(Vector3.forward);
    + */ + public LTDescr setOrientToPath2d( bool doesOrient2d ){ + setOrientToPath(doesOrient2d); + if(this.type==TweenAction.MOVE_CURVED || this.type==TweenAction.MOVE_CURVED_LOCAL){ + this._optional.path.orientToPath2d = doesOrient2d; + }else{ + this._optional.spline.orientToPath2d = doesOrient2d; + } + return this; + } + + public LTDescr setRect( LTRect rect ){ + this._optional.ltRect = rect; + return this; + } + + public LTDescr setRect( Rect rect ){ + this._optional.ltRect = new LTRect(rect); + return this; + } + + public LTDescr setPath( LTBezierPath path ){ + this._optional.path = path; + return this; + } + + /** + * Set the point at which the GameObject will be rotated around + * @method setPoint + * @param {Vector3} point:Vector3 point at which you want the object to rotate around (local space) + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * LeanTween.rotateAround( cube, Vector3.up, 360.0f, 1.0f ) .setPoint( new Vector3(1f,0f,0f) ) .setEase( LeanTweenType.easeInOutBounce );
    + */ + public LTDescr setPoint( Vector3 point ){ + this._optional.point = point; + return this; + } + + public LTDescr setDestroyOnComplete( bool doesDestroy ){ + this.destroyOnComplete = doesDestroy; + return this; + } + + public LTDescr setAudio( object audio ){ + this._optional.onCompleteParam = audio; + return this; + } + + /** + * Set the onComplete method to be called at the end of every loop cycle (also applies to the delayedCall method) + * @method setOnCompleteOnRepeat + * @param {bool} isOn:bool does call onComplete on every loop cycle + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * LeanTween.delayedCall(gameObject,0.3f, delayedMethod).setRepeat(4).setOnCompleteOnRepeat(true); + */ + public LTDescr setOnCompleteOnRepeat( bool isOn ){ + this.onCompleteOnRepeat = isOn; + return this; + } + + /** + * Set the onComplete method to be called at the beginning of the tween (it will still be called when it is completed as well) + * @method setOnCompleteOnStart + * @param {bool} isOn:bool does call onComplete at the start of the tween + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * LeanTween.delayedCall(gameObject, 2f, ()=>{
    // Flash an object 5 times + *  LeanTween.alpha(gameObject, 0f, 1f);
    + *  LeanTween.alpha(gameObject, 1f, 0f).setDelay(1f);
    + * }).setOnCompleteOnStart(true).setRepeat(5);
    + */ + public LTDescr setOnCompleteOnStart( bool isOn ){ + this.onCompleteOnStart = isOn; + return this; + } + + #if !UNITY_3_5 && !UNITY_4_0 && !UNITY_4_0_1 && !UNITY_4_1 && !UNITY_4_2 && !UNITY_4_3 && !UNITY_4_5 + public LTDescr setRect( RectTransform rect ){ + this.rectTransform = rect; + return this; + } + + public LTDescr setSprites( UnityEngine.Sprite[] sprites ){ + this.sprites = sprites; + return this; + } + + public LTDescr setFrameRate( float frameRate ){ + this.time = this.sprites.Length / frameRate; + return this; + } + #endif + + /** + * Have a method called when the tween starts + * @method setOnStart + * @param {Action<>} onStart:Action<> the method that should be called when the tween is starting ex: tweenStarted( ){ } + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * C#:
    + * LeanTween.moveX(gameObject, 5f, 2.0f ).setOnStart( ()=>{ Debug.Log("I started!"); }); + * Javascript:
    + * LeanTween.moveX(gameObject, 5f, 2.0f ).setOnStart( function(){ Debug.Log("I started!"); } ); + */ + public LTDescr setOnStart( Action onStart ){ + this._optional.onStart = onStart; + return this; + } + + /** + * Set the direction of a tween -1f for backwards 1f for forwards (currently only bezier and spline paths are supported) + * @method setDirection + * @param {float} direction:float the direction that the tween should run, -1f for backwards 1f for forwards + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * LeanTween.moveSpline(gameObject, new Vector3[]{new Vector3(0f,0f,0f),new Vector3(1f,0f,0f),new Vector3(1f,0f,0f),new Vector3(1f,0f,1f)}, 1.5f).setDirection(-1f);
    + */ + + public LTDescr setDirection( float direction ){ + if(this.direction!=-1f && this.direction!=1f){ + Debug.LogWarning("You have passed an incorrect direction of '"+direction+"', direction must be -1f or 1f"); + return this; + } + + if(this.direction!=direction){ + // Debug.Log("reverse path:"+this.path+" spline:"+this._optional.spline+" hasInitiliazed:"+this.hasInitiliazed); + if(this.hasInitiliazed){ + this.direction = direction; + }else{ + if(this._optional.path!=null){ + this._optional.path = new LTBezierPath( LTUtility.reverse( this._optional.path.pts ) ); + }else if(this._optional.spline!=null){ + this._optional.spline = new LTSpline( LTUtility.reverse( this._optional.spline.pts ) ); + } + // this.passed = this.time - this.passed; + } + } + + return this; + } + + /** + * Set whether or not the tween will recursively effect an objects children in the hierarchy + * @method setRecursive + * @param {bool} useRecursion:bool whether the tween will recursively effect an objects children in the hierarchy + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * LeanTween.alpha(gameObject, 0f, 1f).setRecursive(true);
    + */ + + public LTDescr setRecursive( bool useRecursion ){ + this.useRecursion = useRecursion; + + return this; + } +} + +//} diff --git a/GGJ2020/Assets/Plugins/LeanTween/LTDescr.cs.meta b/GGJ2020/Assets/Plugins/LeanTween/LTDescr.cs.meta new file mode 100644 index 0000000..e47c628 --- /dev/null +++ b/GGJ2020/Assets/Plugins/LeanTween/LTDescr.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 381c8d6fb1acdc348870a7147bc98723 +timeCreated: 1463137984 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/GGJ2020/Assets/Plugins/LeanTween/LTDescrOptional.cs b/GGJ2020/Assets/Plugins/LeanTween/LTDescrOptional.cs new file mode 100644 index 0000000..f2b2476 --- /dev/null +++ b/GGJ2020/Assets/Plugins/LeanTween/LTDescrOptional.cs @@ -0,0 +1,88 @@ +//namespace DentedPixel{ +using UnityEngine; +using System; +using System.Collections; +using System.Collections.Generic; + +public class LTDescrOptional { + + public Transform toTrans { get; set; } + public Vector3 point { get; set; } + public Vector3 axis { get; set; } + public float lastVal{ get; set; } + public Quaternion origRotation { get; set; } + public LTBezierPath path { get; set; } + public LTSpline spline { get; set; } + public AnimationCurve animationCurve; + public int initFrameCount; + + public LTRect ltRect { get; set; } // maybe get rid of this eventually + + public Action onUpdateFloat { get; set; } + public Action onUpdateFloatRatio { get; set; } + public Action onUpdateFloatObject { get; set; } + public Action onUpdateVector2 { get; set; } + public Action onUpdateVector3 { get; set; } + public Action onUpdateVector3Object { get; set; } + public Action onUpdateColor { get; set; } + public Action onUpdateColorObject { get; set; } + public Action onComplete { get; set; } + public Action onCompleteObject { get; set; } + public object onCompleteParam { get; set; } + public object onUpdateParam { get; set; } + public Action onStart { get; set; } + + +// #if !UNITY_3_5 && !UNITY_4_0 && !UNITY_4_0_1 && !UNITY_4_1 && !UNITY_4_2 +// public SpriteRenderer spriteRen { get; set; } +// #endif +// +// #if LEANTWEEN_1 +// public Hashtable optional; +// #endif +// #if !UNITY_3_5 && !UNITY_4_0 && !UNITY_4_0_1 && !UNITY_4_1 && !UNITY_4_2 && !UNITY_4_3 && !UNITY_4_5 +// public RectTransform rectTransform; +// public UnityEngine.UI.Text uiText; +// public UnityEngine.UI.Image uiImage; +// public UnityEngine.Sprite[] sprites; +// #endif + + + public void reset(){ + animationCurve = null; + + this.onUpdateFloat = null; + this.onUpdateFloatRatio = null; + this.onUpdateVector2 = null; + this.onUpdateVector3 = null; + this.onUpdateFloatObject = null; + this.onUpdateVector3Object = null; + this.onUpdateColor = null; + this.onComplete = null; + this.onCompleteObject = null; + this.onCompleteParam = null; + this.onStart = null; + + this.point = Vector3.zero; + this.initFrameCount = 0; + } + + public void callOnUpdate( float val, float ratioPassed){ + if(this.onUpdateFloat!=null) + this.onUpdateFloat(val); + + if (this.onUpdateFloatRatio != null){ + this.onUpdateFloatRatio(val,ratioPassed); + }else if(this.onUpdateFloatObject!=null){ + this.onUpdateFloatObject(val, this.onUpdateParam); + }else if(this.onUpdateVector3Object!=null){ + this.onUpdateVector3Object(LTDescr.newVect, this.onUpdateParam); + }else if(this.onUpdateVector3!=null){ + this.onUpdateVector3(LTDescr.newVect); + }else if(this.onUpdateVector2!=null){ + this.onUpdateVector2(new Vector2(LTDescr.newVect.x,LTDescr.newVect.y)); + } + } +} + +//} diff --git a/GGJ2020/Assets/Plugins/LeanTween/LTDescrOptional.cs.meta b/GGJ2020/Assets/Plugins/LeanTween/LTDescrOptional.cs.meta new file mode 100644 index 0000000..8b83a30 --- /dev/null +++ b/GGJ2020/Assets/Plugins/LeanTween/LTDescrOptional.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c1ba8f1ef97134cb39b52ae26678db63 +timeCreated: 1471504769 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/GGJ2020/Assets/Plugins/LeanTween/LTSeq.cs b/GGJ2020/Assets/Plugins/LeanTween/LTSeq.cs new file mode 100644 index 0000000..f6ab50b --- /dev/null +++ b/GGJ2020/Assets/Plugins/LeanTween/LTSeq.cs @@ -0,0 +1,227 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +/** +* Internal Representation of a Sequence
    +*
    +*   

    Example:

    +* var seq = LeanTween.sequence();
    +* seq.append(1f); // delay everything one second
    +* seq.append( () => { // fire an event before start
    +*  Debug.Log("I have started");
    +* });
    +* seq.append( LeanTween.move(cube1, Vector3.one * 10f, 1f) ); // do a tween
    +* seq.append( (object obj) => { // fire event after tween
    +*  var dict = obj as Dictionary;
    +*  Debug.Log("We are done now obj value:"+dict["hi"]);
    +* }, new Dictionary(){ {"hi","sup"} } );
    +* @class LTSeq +* @constructor +*/ +public class LTSeq { + + public LTSeq previous; + + public LTSeq current; + + public LTDescr tween; + + public float totalDelay; + + public float timeScale; + + private int debugIter; + + public uint counter; + + public bool toggle = false; + + private uint _id; + + public int id{ + get{ + uint toId = _id | counter << 16; + + /*uint backId = toId & 0xFFFF; + uint backCounter = toId >> 16; + if(_id!=backId || backCounter!=counter){ + Debug.LogError("BAD CONVERSION toId:"+_id); + }*/ + + return (int)toId; + } + } + + public void reset(){ + previous = null; + tween = null; + totalDelay = 0f; + } + + public void init(uint id, uint global_counter){ + reset(); + _id = id; + + counter = global_counter; + + this.current = this; + } + + private LTSeq addOn(){ + this.current.toggle = true; + LTSeq lastCurrent = this.current; + this.current = LeanTween.sequence(true); + Debug.Log("this.current:" + this.current.id + " lastCurrent:" + lastCurrent.id); + this.current.previous = lastCurrent; + lastCurrent.toggle = false; + this.current.totalDelay = lastCurrent.totalDelay; + this.current.debugIter = lastCurrent.debugIter + 1; + return current; + } + + private float addPreviousDelays(){ +// Debug.Log("delay:"+delay+" count:"+this.current.count+" this.current.totalDelay:"+this.current.totalDelay); + + LTSeq prev = this.current.previous; + + if (prev != null && prev.tween!=null) { + return this.current.totalDelay + prev.tween.time; + } + return this.current.totalDelay; + } + + /** + * Add a time delay to the sequence + * @method append (delay) + * @param {float} delay:float amount of time to add to the sequence + * @return {LTSeq} LTDescr an object that distinguishes the tween + * var seq = LeanTween.sequence();
    + * seq.append(1f); // delay everything one second
    + * seq.append( LeanTween.move(cube1, Vector3.one * 10f, 1f) ); // do a tween
    + */ + public LTSeq append( float delay ){ + this.current.totalDelay += delay; + + return this.current; + } + + /** + * Add a time delay to the sequence + * @method append (method) + * @param {System.Action} callback:System.Action method you want to be called + * @return {LTSeq} LTSeq an object that you can add tweens, methods and time on to + * @example + * var seq = LeanTween.sequence();
    + * seq.append( () => { // fire an event before start
    + *  Debug.Log("I have started");
    + * });
    + * seq.append( LeanTween.move(cube1, Vector3.one * 10f, 1f) ); // do a tween
    + * seq.append( () => { // fire event after tween
    + *  Debug.Log("We are done now");
    + * });;
    + */ + public LTSeq append( System.Action callback ){ + LTDescr newTween = LeanTween.delayedCall(0f, callback); +// Debug.Log("newTween:" + newTween); + append(newTween); + + return addOn(); + } + + /** + * Add a time delay to the sequence + * @method add (method(object)) + * @param {System.Action} callback:System.Action method you want to be called + * @return {LTSeq} LTSeq an object that you can add tweens, methods and time on to + * @example + * var seq = LeanTween.sequence();
    + * seq.append( () => { // fire an event before start
    + *  Debug.Log("I have started");
    + * });
    + * seq.append( LeanTween.move(cube1, Vector3.one * 10f, 1f) ); // do a tween
    + * seq.append((object obj) => { // fire event after tween + *  var dict = obj as Dictionary; + *  Debug.Log("We are done now obj value:"+dict["hi"]); + *  }, new Dictionary(){ {"hi","sup"} } ); + */ + public LTSeq append( System.Action callback, object obj ){ + append(LeanTween.delayedCall(0f, callback).setOnCompleteParam(obj)); + + return addOn(); + } + + public LTSeq append( GameObject gameObject, System.Action callback ){ + append(LeanTween.delayedCall(gameObject, 0f, callback)); + + return addOn(); + } + + public LTSeq append( GameObject gameObject, System.Action callback, object obj ){ + append(LeanTween.delayedCall(gameObject, 0f, callback).setOnCompleteParam(obj)); + + return addOn(); + } + + /** + * Retrieve a sequencer object where you can easily chain together tweens and methods one after another + * + * @method add (tween) + * @return {LTSeq} LTSeq an object that you can add tweens, methods and time on to + * @example + * var seq = LeanTween.sequence();
    + * seq.append( LeanTween.move(cube1, Vector3.one * 10f, 1f) ); // do a move tween
    + * seq.append( LeanTween.rotateAround( avatar1, Vector3.forward, 360f, 1f ) ); // then do a rotate tween
    + */ + public LTSeq append( LTDescr tween ){ + this.current.tween = tween; + +// Debug.Log("tween:" + tween + " delay:" + this.current.totalDelay); + + this.current.totalDelay = addPreviousDelays(); + + tween.setDelay( this.current.totalDelay ); + + return addOn(); + } + + public LTSeq insert( LTDescr tween ){ + this.current.tween = tween; + + tween.setDelay( addPreviousDelays() ); + + return addOn(); + } + + + public LTSeq setScale( float timeScale ){ +// Debug.Log("this.current:" + this.current.previous.debugIter+" tween:"+this.current.previous.tween); + setScaleRecursive(this.current, timeScale, 500); + + return addOn(); + } + + private void setScaleRecursive( LTSeq seq, float timeScale, int count ){ + if (count > 0) { + this.timeScale = timeScale; + +// Debug.Log("seq.count:" + count + " seq.tween:" + seq.tween); + seq.totalDelay *= timeScale; + if (seq.tween != null) { +// Debug.Log("seq.tween.time * timeScale:" + seq.tween.time * timeScale + " seq.totalDelay:"+seq.totalDelay +" time:"+seq.tween.time+" seq.tween.delay:"+seq.tween.delay); + if (seq.tween.time != 0f) + seq.tween.setTime(seq.tween.time * timeScale); + seq.tween.setDelay(seq.tween.delay * timeScale); + } + + if (seq.previous != null) + setScaleRecursive(seq.previous, timeScale, count - 1); + } + } + + public LTSeq reverse(){ + + return addOn(); + } + +} diff --git a/GGJ2020/Assets/Plugins/LeanTween/LTSeq.cs.meta b/GGJ2020/Assets/Plugins/LeanTween/LTSeq.cs.meta new file mode 100644 index 0000000..c9b68c4 --- /dev/null +++ b/GGJ2020/Assets/Plugins/LeanTween/LTSeq.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6c88dbe4cdd9944f198e9796ee394c86 +timeCreated: 1488665079 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/GGJ2020/Assets/Plugins/LeanTween/LeanAudio.cs b/GGJ2020/Assets/Plugins/LeanTween/LeanAudio.cs new file mode 100644 index 0000000..b7d1939 --- /dev/null +++ b/GGJ2020/Assets/Plugins/LeanTween/LeanAudio.cs @@ -0,0 +1,418 @@ + +using UnityEngine; +using System.Collections.Generic; + +public class LeanAudioStream { + + public int position = 0; + + public AudioClip audioClip; + public float[] audioArr; + + public LeanAudioStream( float[] audioArr ){ + this.audioArr = audioArr; + } + + public void OnAudioRead(float[] data) { + int count = 0; + while (count < data.Length) { + data[count] = audioArr[this.position]; + position++; + count++; + } + } + + public void OnAudioSetPosition(int newPosition) { + this.position = newPosition; + } +} + +/** +* Create Audio dynamically and easily playback +* +* @class LeanAudio +* @constructor +*/ +public class LeanAudio : object { + + public static float MIN_FREQEUNCY_PERIOD = 0.000115f; + public static int PROCESSING_ITERATIONS_MAX = 50000; + public static float[] generatedWaveDistances; + public static int generatedWaveDistancesCount = 0; + + private static float[] longList; + + public static LeanAudioOptions options(){ + if(generatedWaveDistances==null){ + generatedWaveDistances = new float[ PROCESSING_ITERATIONS_MAX ]; + longList = new float[ PROCESSING_ITERATIONS_MAX ]; + } + return new LeanAudioOptions(); + } + + public static LeanAudioStream createAudioStream( AnimationCurve volume, AnimationCurve frequency, LeanAudioOptions options = null ){ + if(options==null) + options = new LeanAudioOptions(); + + options.useSetData = false; + + int generatedWavePtsLength = createAudioWave( volume, frequency, options); + createAudioFromWave( generatedWavePtsLength, options ); + + return options.stream; + } + + /** + * Create dynamic audio from a set of Animation Curves and other options. + * + * @method createAudio + * @param {AnimationCurve} volumeCurve:AnimationCurve describing the shape of the audios volume (from 0-1). The length of the audio is dicated by the end value here. + * @param {AnimationCurve} frequencyCurve:AnimationCurve describing the width of the oscillations between the sound waves in seconds. Large numbers mean a lower note, while higher numbers mean a tighter frequency and therefor a higher note. Values are usually between 0.01 and 0.000001 (or smaller) + * @param {LeanAudioOptions} options:LeanAudioOptions You can pass any other values in here like vibrato or the frequency you would like the sound to be encoded at. See LeanAudioOptions for more details. + * @return {AudioClip} AudioClip of the procedurally generated audio + * @example + * AnimationCurve volumeCurve = new AnimationCurve( new Keyframe(0f, 1f, 0f, -1f), new Keyframe(1f, 0f, -1f, 0f));
    + * AnimationCurve frequencyCurve = new AnimationCurve( new Keyframe(0f, 0.003f, 0f, 0f), new Keyframe(1f, 0.003f, 0f, 0f));
    + * AudioClip audioClip = LeanAudio.createAudio(volumeCurve, frequencyCurve, LeanAudio.options().setVibrato( new Vector3[]{ new Vector3(0.32f,0f,0f)} ));
    + */ + public static AudioClip createAudio( AnimationCurve volume, AnimationCurve frequency, LeanAudioOptions options = null ){ + if(options==null) + options = new LeanAudioOptions(); + + int generatedWavePtsLength = createAudioWave( volume, frequency, options); + // Debug.Log("generatedWavePtsLength:"+generatedWavePtsLength); + return createAudioFromWave( generatedWavePtsLength, options ); + } + + private static int createAudioWave( AnimationCurve volume, AnimationCurve frequency, LeanAudioOptions options ){ + float time = volume[ volume.length - 1 ].time; + int listLength = 0; + // List list = new List(); + + // generatedWaveDistances = new List(); + // float[] vibratoValues = new float[ vibrato.Length ]; + float passed = 0f; + for(int i = 0; i < PROCESSING_ITERATIONS_MAX; i++){ + float f = frequency.Evaluate(passed); + if(f=time) + break; + if(listLength >= PROCESSING_ITERATIONS_MAX-1){ + Debug.LogError("LeanAudio has reached it's processing cap. To avoid this error increase the number of iterations ex: LeanAudio.PROCESSING_ITERATIONS_MAX = "+(PROCESSING_ITERATIONS_MAX*2)); + break; + }else{ + int distPoint = listLength / 2; + + //generatedWaveDistances.Add( f ); + passed += f; + + generatedWaveDistances[ distPoint ] = passed; + //Debug.Log("distPoint:"+distPoint+" passed:"+passed); + + //list.Add( passed ); + //list.Add( i%2==0 ? -height : height ); + + longList[ listLength ] = passed; + longList[ listLength + 1 ] = i%2==0 ? -height : height; + } + + + + listLength += 2; + + } + + listLength += -2; + generatedWaveDistancesCount = listLength / 2; + + /*float[] wave = new float[ listLength ]; + for(int i = 0; i < wave.Length; i++){ + wave[i] = longList[i]; + }*/ + return listLength; + } + + private static AudioClip createAudioFromWave( int waveLength, LeanAudioOptions options ){ + float time = longList[ waveLength - 2 ]; + float[] audioArr = new float[ (int)(options.frequencyRate*time) ]; + + int waveIter = 0; + float subWaveDiff = longList[waveIter]; + float subWaveTimeLast = 0f; + float subWaveTime = longList[waveIter]; + float waveHeight = longList[waveIter+1]; + for(int i = 0; i < audioArr.Length; i++){ + float passedTime = (float)i / (float)options.frequencyRate; + if(passedTime > longList[waveIter] ){ + subWaveTimeLast = longList[waveIter]; + waveIter += 2; + subWaveDiff = longList[waveIter] - longList[waveIter-2]; + waveHeight = longList[waveIter+1]; + // Debug.Log("passed wave i:"+i); + } + subWaveTime = passedTime - subWaveTimeLast; + float ratioElapsed = subWaveTime / subWaveDiff; + + float value = Mathf.Sin( ratioElapsed * Mathf.PI ); + + if(options.waveStyle==LeanAudioOptions.LeanAudioWaveStyle.Square){ + if(value>0f) + value = 1f; + if(value<0f) + value = -1f; + }else if(options.waveStyle==LeanAudioOptions.LeanAudioWaveStyle.Sawtooth){ + float sign = value > 0f ? 1f : -1f; + if(ratioElapsed<0.5f){ + value = (ratioElapsed*2f)*sign; + }else{ // 0.5f - 1f + value = (1f - ratioElapsed)*2f*sign; + } + }else if(options.waveStyle==LeanAudioOptions.LeanAudioWaveStyle.Noise){ + float peakMulti = (1f-options.waveNoiseInfluence) + Mathf.PerlinNoise(0f, passedTime * options.waveNoiseScale ) * options.waveNoiseInfluence; + + /*if(i<25){ + Debug.Log("passedTime:"+passedTime+" peakMulti:"+peakMulti+" infl:"+options.waveNoiseInfluence); + }*/ + + value *= peakMulti; + } + + //if(i<25) + // Debug.Log("passedTime:"+passedTime+" value:"+value+" ratioElapsed:"+ratioElapsed+" subWaveTime:"+subWaveTime+" subWaveDiff:"+subWaveDiff); + + value *= waveHeight; + + + if(options.modulation!=null){ + for(int k=0; k(); // add an audio source + aSource.clip = clip; // define the clip + aSource.Play(); // start the sound + GameObject.Destroy(tempGO, clip.length); // destroy object after clip duration + return aSource; // return the AudioSource reference + } + + public static void printOutAudioClip( AudioClip audioClip, ref AnimationCurve curve, float scaleX = 1f ){ + // Debug.Log("Audio channels:"+audioClip.channels+" frequency:"+audioClip.frequency+" length:"+audioClip.length+" samples:"+audioClip.samples); + float[] samples = new float[audioClip.samples * audioClip.channels]; + audioClip.GetData(samples, 0); + int i = 0; + + Keyframe[] frames = new Keyframe[samples.Length]; + while (i < samples.Length) { + frames[i] = new Keyframe( (float)i * scaleX, samples[i] ); + ++i; + } + curve = new AnimationCurve( frames ); + } +} + + +/** +* Pass in options to LeanAudio +* +* @class LeanAudioOptions +* @constructor +*/ +public class LeanAudioOptions : object { + + public enum LeanAudioWaveStyle{ + Sine, + Square, + Sawtooth, + Noise + } + + public LeanAudioWaveStyle waveStyle = LeanAudioWaveStyle.Sine; + public Vector3[] vibrato; + public Vector3[] modulation; + public int frequencyRate = 44100; + public float waveNoiseScale = 1000; + public float waveNoiseInfluence = 1f; + + public bool useSetData = true; + public LeanAudioStream stream; + + public LeanAudioOptions(){} + + /** + * Set the frequency for the audio is encoded. 44100 is CD quality, but you can usually get away with much lower (or use a lower amount to get a more 8-bit sound). + * + * @method setFrequency + * @param {int} frequencyRate:int of the frequency you wish to encode the AudioClip at + * @return {LeanAudioOptions} LeanAudioOptions describing optional values + * @example + * AnimationCurve volumeCurve = new AnimationCurve( new Keyframe(0f, 1f, 0f, -1f), new Keyframe(1f, 0f, -1f, 0f));
    + * AnimationCurve frequencyCurve = new AnimationCurve( new Keyframe(0f, 0.003f, 0f, 0f), new Keyframe(1f, 0.003f, 0f, 0f));
    + * AudioClip audioClip = LeanAudio.createAudio(volumeCurve, frequencyCurve, LeanAudio.options().setVibrato( new Vector3[]{ new Vector3(0.32f,0f,0f)} ).setFrequency(12100) );
    + */ + public LeanAudioOptions setFrequency( int frequencyRate ){ + this.frequencyRate = frequencyRate; + return this; + } + + /** + * Set details about the shape of the curve by adding vibrato modulations through it (alters the peak values giving it a wah-wah effect). You can add as many as you want to sculpt out more detail in the sound wave. + * + * @method setVibrato + * @param {Vector3[]} vibratoArray:Vector3[] The first value is the period in seconds that you wish to have the vibrato wave fluctuate at. The second value is the minimum height you wish the vibrato wave to dip down to (default is zero). The third is reserved for future effects. + * @return {LeanAudioOptions} LeanAudioOptions describing optional values + * @example + * AnimationCurve volumeCurve = new AnimationCurve( new Keyframe(0f, 1f, 0f, -1f), new Keyframe(1f, 0f, -1f, 0f));
    + * AnimationCurve frequencyCurve = new AnimationCurve( new Keyframe(0f, 0.003f, 0f, 0f), new Keyframe(1f, 0.003f, 0f, 0f));
    + * AudioClip audioClip = LeanAudio.createAudio(volumeCurve, frequencyCurve, LeanAudio.options().setVibrato( new Vector3[]{ new Vector3(0.32f,0.3f,0f)} ).setFrequency(12100) );
    + */ + public LeanAudioOptions setVibrato( Vector3[] vibrato ){ + this.vibrato = vibrato; + return this; + } + + /* + public LeanAudioOptions setModulation( Vector3[] modulation ){ + this.modulation = modulation; + return this; + }*/ + + public LeanAudioOptions setWaveSine(){ + this.waveStyle = LeanAudioWaveStyle.Sine; + return this; + } + + public LeanAudioOptions setWaveSquare(){ + this.waveStyle = LeanAudioWaveStyle.Square; + return this; + } + + public LeanAudioOptions setWaveSawtooth(){ + this.waveStyle = LeanAudioWaveStyle.Sawtooth; + return this; + } + + public LeanAudioOptions setWaveNoise(){ + this.waveStyle = LeanAudioWaveStyle.Noise; + return this; + } + + public LeanAudioOptions setWaveStyle( LeanAudioWaveStyle style ){ + this.waveStyle = style; + return this; + } + + + public LeanAudioOptions setWaveNoiseScale( float waveScale ){ + this.waveNoiseScale = waveScale; + return this; + } + + public LeanAudioOptions setWaveNoiseInfluence( float influence ){ + this.waveNoiseInfluence = influence; + return this; + } +} + + diff --git a/GGJ2020/Assets/Plugins/LeanTween/LeanAudio.cs.meta b/GGJ2020/Assets/Plugins/LeanTween/LeanAudio.cs.meta new file mode 100644 index 0000000..cd86baf --- /dev/null +++ b/GGJ2020/Assets/Plugins/LeanTween/LeanAudio.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 52e41e970d9353942b27458440bec9eb +timeCreated: 1427917971 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/GGJ2020/Assets/Plugins/LeanTween/LeanTest.cs b/GGJ2020/Assets/Plugins/LeanTween/LeanTest.cs new file mode 100644 index 0000000..8289622 --- /dev/null +++ b/GGJ2020/Assets/Plugins/LeanTween/LeanTest.cs @@ -0,0 +1,123 @@ +using UnityEngine; +using System.Collections; + +public class LeanTester : MonoBehaviour { + public float timeout = 15f; + + #if !UNITY_3_5 && !UNITY_4_0 && !UNITY_4_0_1 && !UNITY_4_1 && !UNITY_4_2 && !UNITY_4_3 && !UNITY_4_5 + public void Start(){ + StartCoroutine( timeoutCheck() ); + } + + IEnumerator timeoutCheck(){ + float pauseEndTime = Time.realtimeSinceStartup + timeout; + while (Time.realtimeSinceStartup < pauseEndTime) + { + yield return 0; + } + if(LeanTest.testsFinished==false){ + Debug.Log(LeanTest.formatB("Tests timed out!")); + LeanTest.overview(); + } + } + #endif +} + +public class LeanTest : object { + public static int expected = 0; + private static int tests = 0; + private static int passes = 0; + + public static float timeout = 15f; + public static bool timeoutStarted = false; + public static bool testsFinished = false; + + public static void debug( string name, bool didPass, string failExplaination = null){ + expect( didPass, name, failExplaination); + } + + public static void expect( bool didPass, string definition, string failExplaination = null){ + float len = printOutLength(definition); + int paddingLen = 40-(int)(len*1.05f); + #if UNITY_FLASH + string padding = padRight(paddingLen); + #else + string padding = "".PadRight(paddingLen,"_"[0]); + #endif + string logName = formatB(definition) +" " + padding + " [ "+ (didPass ? formatC("pass","green") : formatC("fail","red")) +" ]"; + if(didPass==false && failExplaination!=null) + logName += " - " + failExplaination; + Debug.Log(logName); + if(didPass) + passes++; + tests++; + + // Debug.Log("tests:"+tests+" expected:"+expected); + if(tests==expected && testsFinished==false){ + overview(); + }else if(tests>expected){ + Debug.Log(formatB("Too many tests for a final report!") + " set LeanTest.expected = "+tests); + } + + if(timeoutStarted==false){ + timeoutStarted = true; + GameObject tester = new GameObject(); + tester.name = "~LeanTest"; + LeanTester test = tester.AddComponent(typeof(LeanTester)) as LeanTester; + test.timeout = timeout; + #if !UNITY_EDITOR + tester.hideFlags = HideFlags.HideAndDontSave; + #endif + } + } + + public static string padRight(int len){ + string str = ""; + for(int i = 0; i < len; i++){ + str += "_"; + } + return str; + } + + public static float printOutLength( string str ){ + float len = 0.0f; + for(int i = 0; i < str.Length; i++){ + if(str[i]=="I"[0]){ + len += 0.5f; + }else if(str[i]=="J"[0]){ + len += 0.85f; + }else{ + len += 1.0f; + } + } + return len; + } + + public static string formatBC( string str, string color ){ + return formatC(formatB(str),color); + } + + public static string formatB( string str ){ + #if UNITY_3_5 || UNITY_4_0 || UNITY_4_0_1 || UNITY_4_1 || UNITY_4_2 + return str; + #else + return ""+ str + ""; + #endif + } + + public static string formatC( string str, string color ){ + #if UNITY_3_5 || UNITY_4_0 || UNITY_4_0_1 || UNITY_4_1 || UNITY_4_2 + return str; + #else + return ""+ str + ""; + #endif + } + + public static void overview(){ + testsFinished = true; + int failedCnt = (expected-passes); + string failedStr = failedCnt > 0 ? formatBC(""+failedCnt,"red") : ""+failedCnt; + Debug.Log(formatB("Final Report:")+" _____________________ PASSED: "+formatBC(""+passes,"green")+" FAILED: "+failedStr+" "); + } +} + \ No newline at end of file diff --git a/GGJ2020/Assets/Plugins/LeanTween/LeanTest.cs.meta b/GGJ2020/Assets/Plugins/LeanTween/LeanTest.cs.meta new file mode 100644 index 0000000..0af8aa2 --- /dev/null +++ b/GGJ2020/Assets/Plugins/LeanTween/LeanTest.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 82464f26ca2ba284a8f92f51248c574a +timeCreated: 1427917971 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/GGJ2020/Assets/Plugins/LeanTween/LeanTween.cs b/GGJ2020/Assets/Plugins/LeanTween/LeanTween.cs new file mode 100644 index 0000000..68f025c --- /dev/null +++ b/GGJ2020/Assets/Plugins/LeanTween/LeanTween.cs @@ -0,0 +1,3709 @@ +//namespace DentedPixel{ + +// LeanTween version 2.46 - http://dentedpixel.com/developer-diary/ +// +// The MIT License (MIT) +// +// Copyright (c) 2017 Russell Savage - Dented Pixel +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + + + +/* +TERMS OF USE - EASING EQUATIONS# +Open source under the BSD License. +Copyright (c)2001 Robert Penner +All rights reserved. +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +Neither the name of the author nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/** +* Pass this to the "ease" parameter, to get a different easing behavior

    +* Example:
    LeanTween.rotateX(gameObject, 270.0f, 1.5f).setEase(LeanTweenType.easeInBack); +* +* @class LeanTweenType +*/ + +/** +* @property {integer} linear +*/ +/** +* @property {integer} easeOutQuad +*/ +/** +* @property {integer} easeInQuad +*/ +/** +* @property {integer} easeInOutQuad +*/ +/** +* @property {integer} easeInCubic +*/ +/** +* @property {integer} easeOutCubic +*/ +/** +* @property {integer} easeInOutCubic +*/ +/** +* @property {integer} easeInQuart +*/ +/** +* @property {integer} easeOutQuart +*/ +/** +* @property {integer} easeInOutQuart +*/ +/** +* @property {integer} easeInQuint +*/ +/** +* @property {integer} easeOutQuint +*/ +/** +* @property {integer} easeInOutQuint +*/ +/** +* @property {integer} easeInSine +*/ +/** +* @property {integer} easeOutSine +*/ +/** +* @property {integer} easeInOutSine +*/ +/** +* @property {integer} easeInExpo +*/ +/** +* @property {integer} easeOutExpo +*/ +/** +* @property {integer} easeInOutExpo +*/ +/** +* @property {integer} easeInCirc +*/ +/** +* @property {integer} easeOutCirc +*/ +/** +* @property {integer} easeInOutCirc +*/ +/** +* @property {integer} easeInBounce +*/ +/** +* @property {integer} easeOutBounce +*/ +/** +* @property {integer} easeInOutBounce +*/ +/** +* @property {integer} easeInBack +*/ +/** +* @property {integer} easeOutBack +*/ +/** +* @property {integer} easeInOutBack +*/ +/** +* @property {integer} easeInElastic +*/ +/** +* @property {integer} easeOutElastic +*/ +/** +* @property {integer} easeInOutElastic +*/ +/** +* @property {integer} punch +*/ +using UnityEngine; +using System; +using System.Collections.Generic; + +public enum TweenAction{ + MOVE_X, + MOVE_Y, + MOVE_Z, + MOVE_LOCAL_X, + MOVE_LOCAL_Y, + MOVE_LOCAL_Z, + MOVE_CURVED, + MOVE_CURVED_LOCAL, + MOVE_SPLINE, + MOVE_SPLINE_LOCAL, + SCALE_X, + SCALE_Y, + SCALE_Z, + ROTATE_X, + ROTATE_Y, + ROTATE_Z, + ROTATE_AROUND, + ROTATE_AROUND_LOCAL, + CANVAS_ROTATEAROUND, + CANVAS_ROTATEAROUND_LOCAL, + CANVAS_PLAYSPRITE, + ALPHA, + TEXT_ALPHA, + CANVAS_ALPHA, + CANVASGROUP_ALPHA, + ALPHA_VERTEX, + COLOR, + CALLBACK_COLOR, + TEXT_COLOR, + CANVAS_COLOR, + CANVAS_MOVE_X, + CANVAS_MOVE_Y, + CANVAS_MOVE_Z, + CALLBACK, + MOVE, + MOVE_LOCAL, + MOVE_TO_TRANSFORM, + ROTATE, + ROTATE_LOCAL, + SCALE, + VALUE3, + GUI_MOVE, + GUI_MOVE_MARGIN, + GUI_SCALE, + GUI_ALPHA, + GUI_ROTATE, + DELAYED_SOUND, + CANVAS_MOVE, + CANVAS_SCALE, + CANVAS_SIZEDELTA, +} + +public enum LeanTweenType{ + notUsed, linear, easeOutQuad, easeInQuad, easeInOutQuad, easeInCubic, easeOutCubic, easeInOutCubic, easeInQuart, easeOutQuart, easeInOutQuart, + easeInQuint, easeOutQuint, easeInOutQuint, easeInSine, easeOutSine, easeInOutSine, easeInExpo, easeOutExpo, easeInOutExpo, easeInCirc, easeOutCirc, easeInOutCirc, + easeInBounce, easeOutBounce, easeInOutBounce, easeInBack, easeOutBack, easeInOutBack, easeInElastic, easeOutElastic, easeInOutElastic, easeSpring, easeShake, punch, once, clamp, pingPong, animationCurve +} + +/** +* LeanTween is an efficient tweening engine for Unity3d

    +* Index of All Methods | Optional Paramaters that can be passed

    +* Optional Parameters are passed at the end of every method
    +*
    +* Example:
    +* LeanTween.moveX( gameObject, 1f, 1f).setEase( LeanTweenType.easeInQuad ).setDelay(1f);
    +*
    +* You can pass the optional parameters in any order, and chain on as many as you wish!

    +* You can also modify this tween later, just save the unique id of the tween.
    +*

    Example:

    +* int id = LeanTween.moveX(gameObject, 1f, 1f).id;
    +* LTDescr d = LeanTween.descr( id );

    +* if(d!=null){ // if the tween has already finished it will return null
    +*    // change some parameters
    +*    d.setOnComplete( onCompleteFunc ).setEase( LeanTweenType.easeInOutBack );
    +* } +* +* @class LeanTween +*/ + +public class LeanTween : MonoBehaviour { + + public static bool throwErrors = true; + public static float tau = Mathf.PI*2.0f; + public static float PI_DIV2 = Mathf.PI / 2.0f; + + private static LTSeq[] sequences; + + private static LTDescr[] tweens; + private static int[] tweensFinished; + private static int[] tweensFinishedIds; + private static LTDescr tween; + private static int tweenMaxSearch = -1; + private static int maxTweens = 400; + private static int maxSequences = 400; + private static int frameRendered= -1; + private static GameObject _tweenEmpty; + public static float dtEstimated = -1f; + public static float dtManual; + #if UNITY_3_5 || UNITY_4_0 || UNITY_4_0_1 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_5 + private static float previousRealTime; + #endif + public static float dtActual; + private static uint global_counter = 0; + private static int i; + private static int j; + private static int finishedCnt; + public static AnimationCurve punch = new AnimationCurve( new Keyframe(0.0f, 0.0f ), new Keyframe(0.112586f, 0.9976035f ), new Keyframe(0.3120486f, -0.1720615f ), new Keyframe(0.4316337f, 0.07030682f ), new Keyframe(0.5524869f, -0.03141804f ), new Keyframe(0.6549395f, 0.003909959f ), new Keyframe(0.770987f, -0.009817753f ), new Keyframe(0.8838775f, 0.001939224f ), new Keyframe(1.0f, 0.0f ) ); + public static AnimationCurve shake = new AnimationCurve( new Keyframe(0f, 0f), new Keyframe(0.25f, 1f), new Keyframe(0.75f, -1f), new Keyframe(1f, 0f) ) ; + + public static void init(){ + init(maxTweens); + } + + public static int maxSearch{ + get{ + return tweenMaxSearch; + } + } + + public static int maxSimulataneousTweens{ + get { + return maxTweens; + } + } + + /** + * Find out how many tweens you have animating at a given time Find out how many tweens you have animating at a given time + * + * @method LeanTween.tweensRunning + * @example + * Debug.Log("I have "+LeanTween.tweensRunning+" animating!"); + */ + public static int tweensRunning{ + get{ + int count = 0; + for (int i = 0; i <= tweenMaxSearch; i++){ + if (tweens[i].toggle){ + count++; + } + } + return count; + } + } + + /** + * This line is optional. Here you can specify the maximum number of tweens you will use (the default is 400). This must be called before any use of LeanTween is made for it to be effective. This line is optional. Here you can specify the maximum number of tweens you will use (the default is 400). This must be called before any use of LeanTween is made for it to be effective. + * + * @method LeanTween.init + * @param {integer} maxSimultaneousTweens:int The maximum number of tweens you will use, make sure you don't go over this limit, otherwise the code will throw an error + * @example + * LeanTween.init( 800 ); + */ + public static void init(int maxSimultaneousTweens ){ + init(maxSimultaneousTweens, maxSequences); + } + + public static void init(int maxSimultaneousTweens, int maxSimultaneousSequences){ + if(tweens==null){ + maxTweens = maxSimultaneousTweens; + tweens = new LTDescr[maxTweens]; + tweensFinished = new int[maxTweens]; + tweensFinishedIds = new int[maxTweens]; + _tweenEmpty = new GameObject(); + _tweenEmpty.name = "~LeanTween"; + _tweenEmpty.AddComponent(typeof(LeanTween)); + _tweenEmpty.isStatic = true; + #if !UNITY_EDITOR + _tweenEmpty.hideFlags = HideFlags.HideAndDontSave; + #endif + #if UNITY_EDITOR + if(Application.isPlaying) + DontDestroyOnLoad( _tweenEmpty ); + #else + DontDestroyOnLoad( _tweenEmpty ); + #endif + for(int i = 0; i < maxTweens; i++){ + tweens[i] = new LTDescr(); + } + + #if UNITY_5_4_OR_NEWER + UnityEngine.SceneManagement.SceneManager.sceneLoaded += onLevelWasLoaded54; + #endif + + sequences = new LTSeq[ maxSimultaneousSequences ]; + + for(int i = 0; i < maxSimultaneousSequences; i++){ + sequences[i] = new LTSeq(); + } + } + } + + public static void reset(){ + if(tweens!=null){ + for (int i = 0; i <= tweenMaxSearch; i++){ + if(tweens[i]!=null) + tweens[i].toggle = false; + } + } + tweens = null; + Destroy(_tweenEmpty); + } + + public void Update(){ + LeanTween.update(); + } + + #if UNITY_5_4_OR_NEWER + private static void onLevelWasLoaded54( UnityEngine.SceneManagement.Scene scene, UnityEngine.SceneManagement.LoadSceneMode mode ){ internalOnLevelWasLoaded( scene.buildIndex ); } + #else + public void OnLevelWasLoaded( int lvl ){ internalOnLevelWasLoaded( lvl ); } + #endif + + private static void internalOnLevelWasLoaded( int lvl ){ + // Debug.Log("reseting gui"); + LTGUI.reset(); + } + + private static int maxTweenReached; + + public static void update() { + if(frameRendered != Time.frameCount){ // make sure update is only called once per frame + init(); + + #if UNITY_3_5 || UNITY_4_0 || UNITY_4_0_1 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_5 + dtEstimated = Time.realtimeSinceStartup - previousRealTime; + if(dtEstimated>0.2f) // a catch put in, when at the start sometimes this number can grow unrealistically large + dtEstimated = 0.2f; + previousRealTime = Time.realtimeSinceStartup; + #else + + dtEstimated = dtEstimated<0f ? 0f : dtEstimated = Time.unscaledDeltaTime; + + // Debug.Log("Time.unscaledDeltaTime:"+Time.unscaledDeltaTime); + #endif + + dtActual = Time.deltaTime; + maxTweenReached = 0; + finishedCnt = 0; + // if(tweenMaxSearch>1500) + // Debug.Log("tweenMaxSearch:"+tweenMaxSearch +" maxTweens:"+maxTweens); + for( int i = 0; i <= tweenMaxSearch && i < maxTweens; i++){ + tween = tweens[i]; +// if(i==0 && tweens[i].toggle) +// Debug.Log("tweens["+i+"]"+tweens[i]); + if(tween.toggle){ + maxTweenReached = i; + + if (tween.updateInternal()) { // returns true if the tween is finished with it's loop + tweensFinished[finishedCnt] = i; + tweensFinishedIds[finishedCnt] = tweens[i].id; + finishedCnt++; + } + } + } + + // Debug.Log("maxTweenReached:"+maxTweenReached); + tweenMaxSearch = maxTweenReached; + frameRendered = Time.frameCount; + + for(int i = 0; i < finishedCnt; i++){ + j = tweensFinished[i]; + tween = tweens[ j ]; + + if (tween.id == tweensFinishedIds[i]){ + // Debug.Log("removing tween:"+tween); + removeTween(j); + if(tween.hasExtraOnCompletes && tween.trans!=null) + tween.callOnCompletes(); + } + } + + } + } + + + + public static void removeTween( int i, int uniqueId){ // Only removes the tween if the unique id matches Move a GameObject to a certain location + if(tweens[i].uniqueId==uniqueId){ + removeTween( i ); + } + } + + // This method is only used internally! Do not call this from your scripts. To cancel a tween use LeanTween.cancel + public static void removeTween( int i ){ + if(tweens[i].toggle){ + tweens[i].toggle = false; + tweens[i].counter = uint.MaxValue; + //logError("Removing tween["+i+"]:"+tweens[i]); + if(tweens[i].destroyOnComplete){ +// Debug.Log("destroying tween.type:"+tween.type+" ltRect"+(tweens[i]._optional.ltRect==null)); + if(tweens[i]._optional.ltRect!=null){ + // Debug.Log("destroy i:"+i+" id:"+tweens[i].ltRect.id); + LTGUI.destroy( tweens[i]._optional.ltRect.id ); + }else{ // check if equal to tweenEmpty + if(tweens[i].trans!=null && tweens[i].trans.gameObject!=_tweenEmpty){ + Destroy(tweens[i].trans.gameObject); + } + } + } + //tweens[i].optional = null; + startSearch = i; + //Debug.Log("start search reset:"+startSearch + " i:"+i+" tweenMaxSearch:"+tweenMaxSearch); + if(i+1>=tweenMaxSearch){ + //Debug.Log("reset to zero"); + startSearch = 0; + //tweenMaxSearch--; + } + } + } + + public static Vector3[] add(Vector3[] a, Vector3 b){ + Vector3[] c = new Vector3[ a.Length ]; + for(i=0; iCancels all tweens + * + * @method LeanTween.cancelAll + * @param {bool} callComplete:bool (optional) if true, then the all onCompletes will run before canceling + * @example LeanTween.cancelAll(true);
    + */ + public static void cancelAll(){ + cancelAll(false); + } + public static void cancelAll(bool callComplete){ + init(); + for (int i = 0; i <= tweenMaxSearch; i++) + { + if (tweens[i].trans != null){ + if (callComplete && tweens[i].optional.onComplete != null) + tweens[i].optional.onComplete(); + removeTween(i); + } + } + } + + /** + * Cancel all tweens that are currently targeting the gameObjectCancel all tweens that are currently targeting the gameObject + * + * @method LeanTween.cancel + * @param {GameObject} gameObject:GameObject gameObject whose tweens you wish to cancel + * @param {bool} callOnComplete:bool (optional) whether to call the onComplete method before canceling + * @example LeanTween.move( gameObject, new Vector3(0f,1f,2f), 1f);
    + * LeanTween.cancel( gameObject ); + */ + public static void cancel( GameObject gameObject ){ + cancel( gameObject, false); + } + public static void cancel( GameObject gameObject, bool callOnComplete ){ + init(); + Transform trans = gameObject.transform; + for(int i = 0; i <= tweenMaxSearch; i++){ + if(tweens[i].toggle && tweens[i].trans==trans){ + if (callOnComplete && tweens[i].optional.onComplete != null) + tweens[i].optional.onComplete(); + removeTween(i); + } + } + } + + public static void cancel( RectTransform rect ){ + cancel( rect.gameObject, false); + } + +// public static void cancel( GameObject gameObject, int uniqueId ){ +// if(uniqueId>=0){ +// init(); +// int backId = uniqueId & 0xFFFF; +// int backCounter = uniqueId >> 16; +// // Debug.Log("uniqueId:"+uniqueId+ " id:"+backId +" counter:"+backCounter + " setCounter:"+ tweens[backId].counter + " tweens[id].type:"+tweens[backId].type); +// if(tweens[backId].trans==null || (tweens[backId].trans.gameObject == gameObject && tweens[backId].counter==backCounter)) +// removeTween((int)backId); +// } +// } + + public static void cancel( GameObject gameObject, int uniqueId, bool callOnComplete = false ){ + if(uniqueId>=0){ + init(); + int backId = uniqueId & 0xFFFF; + int backCounter = uniqueId >> 16; + // Debug.Log("uniqueId:"+uniqueId+ " id:"+backId +" counter:"+backCounter + " setCounter:"+ tw eens[backId].counter + " tweens[id].type:"+tweens[backId].type); + if(tweens[backId].trans==null || (tweens[backId].trans.gameObject == gameObject && tweens[backId].counter==backCounter)) { + if (callOnComplete && tweens[backId].optional.onComplete != null) + tweens[backId].optional.onComplete(); + removeTween((int)backId); + } + } + } + + public static void cancel( LTRect ltRect, int uniqueId ){ + if(uniqueId>=0){ + init(); + int backId = uniqueId & 0xFFFF; + int backCounter = uniqueId >> 16; + // Debug.Log("uniqueId:"+uniqueId+ " id:"+backId +" action:"+(TweenAction)backType + " tweens[id].type:"+tweens[backId].type); + if(tweens[backId]._optional.ltRect == ltRect && tweens[backId].counter==backCounter) + removeTween((int)backId); + } + } + + /** + * Cancel a specific tween with the provided id Cancel a specific tween with the provided id + * + * @method LeanTween.cancel + * @param {int} id:int unique id that represents that tween + * @param {bool} callOnComplete:bool (optional) whether to call the onComplete method before canceling + * @example int id = LeanTween.move( gameObject, new Vector3(0f,1f,2f), 1f).id;
    + * LeanTween.cancel( id ); + */ + public static void cancel( int uniqueId ){ + cancel( uniqueId, false); + } + public static void cancel( int uniqueId, bool callOnComplete ){ + if(uniqueId>=0){ + init(); + int backId = uniqueId & 0xFFFF; + int backCounter = uniqueId >> 16; + if (backId > tweens.Length - 1) { // sequence + int sequenceId = backId - tweens.Length; + LTSeq seq = sequences[sequenceId]; + for (int i = 0; i < maxSequences; i++) { + if (seq.current.tween != null) { + int tweenId = seq.current.tween.uniqueId; + int tweenIndex = tweenId & 0xFFFF; + removeTween(tweenIndex); + } + if (seq.previous == null) + break; + seq.current = seq.previous; + } + } else { // tween + // Debug.Log("uniqueId:"+uniqueId+ " id:"+backId +" action:"+(TweenAction)backType + " tweens[id].type:"+tweens[backId].type); + if (tweens[backId].counter == backCounter) { + if (callOnComplete && tweens[backId].optional.onComplete != null) + tweens[backId].optional.onComplete(); + removeTween((int)backId); + } + } + } + } + + /** + * Retrieve a tweens LTDescr object to modify Retrieve a tweens LTDescr object to modify + * + * @method LeanTween.descr + * @param {int} id:int unique id that represents that tween + * @example int id = LeanTween.move( gameObject, new Vector3(0f,1f,2f), 1f).setOnComplete( oldMethod ).id;

    + *
    // later I want decide I want to change onComplete method
    + * LTDescr descr = LeanTween.descr( id );
    + * if(descr!=null) // if the tween has already finished it will come back null
    + *   descr.setOnComplete( newMethod );
    + */ + public static LTDescr descr( int uniqueId ){ + init(); + + int backId = uniqueId & 0xFFFF; + int backCounter = uniqueId >> 16; + +// Debug.Log("backId:" + backId+" backCounter:"+backCounter); + if (tweens[backId] != null && tweens[backId].uniqueId == uniqueId && tweens[backId].counter == backCounter) { + // Debug.Log("tween count:" + tweens[backId].counter); + return tweens[backId]; + } + for(int i = 0; i <= tweenMaxSearch; i++){ + if (tweens[i].uniqueId == uniqueId && tweens[i].counter == backCounter) { + return tweens[i]; + } + } + return null; + } + + public static LTDescr description( int uniqueId ){ + return descr( uniqueId ); + } + + /** + * Retrieve a tweens LTDescr object(s) to modify Retrieve a tweens LTDescr object(s) to modifyn + * + * @method LeanTween.descriptions + * @param {GameObject} id:GameObject object whose tween descriptions you want to retrieve + * @example LeanTween.move( gameObject, new Vector3(0f,1f,2f), 1f).setOnComplete( oldMethod );

    + *
    // later I want decide I want to change onComplete method
    + * LTDescr[] descr = LeanTween.descriptions( gameObject );
    + * if(descr.Length>0) // make sure there is a valid description for this target
    + *   descr[0].setOnComplete( newMethod );// in this case we only ever expect there to be one tween on this object
    + */ + public static LTDescr[] descriptions(GameObject gameObject = null) { + if (gameObject == null) return null; + + List descrs = new List(); + Transform trans = gameObject.transform; + for (int i = 0; i <= tweenMaxSearch; i++) { + if (tweens[i].toggle && tweens[i].trans == trans) + descrs.Add( tweens[i] ); + } + return descrs.ToArray(); + } + + [System.Obsolete("Use 'pause( id )' instead")] + public static void pause( GameObject gameObject, int uniqueId ){ + pause( uniqueId ); + } + + /** + * Pause all tweens for a GameObject Pause all tweens for a GameObject + * + * @method LeanTween.pause + * @param {int} id:int Id of the tween you want to pause + * @example + * int id = LeanTween.moveX(gameObject, 5, 1.0).id
    + * LeanTween.pause( id );
    + * // Later....
    + * LeanTween.resume( id ); + */ + public static void pause( int uniqueId ){ + int backId = uniqueId & 0xFFFF; + int backCounter = uniqueId >> 16; + if(tweens[backId].counter==backCounter){ + tweens[backId].pause(); + } + } + + /** + * Pause all tweens for a GameObject Pause all tweens for a GameObject + * + * @method LeanTween.pause + * @param {GameObject} gameObject:GameObject GameObject whose tweens you want to pause + */ + public static void pause( GameObject gameObject ){ + Transform trans = gameObject.transform; + for(int i = 0; i <= tweenMaxSearch; i++){ + if(tweens[i].trans==trans){ + tweens[i].pause(); + } + } + } + + /** + * Pause all active tweens Pause all active tweens + * + * @method LeanTween.pauseAll + */ + public static void pauseAll(){ + init(); + for (int i = 0; i <= tweenMaxSearch; i++){ + tweens[i].pause(); + } + } + + /** + * Resume all active tweens Resume all active tweens + * + * @method LeanTween.resumeAll + */ + public static void resumeAll(){ + init(); + for (int i = 0; i <= tweenMaxSearch; i++){ + tweens[i].resume(); + } + } + + [System.Obsolete("Use 'resume( id )' instead")] + public static void resume( GameObject gameObject, int uniqueId ){ + resume( uniqueId ); + } + + /** + * Resume a specific tween Resume a specific tween + * + * @method LeanTween.resume + * @param {int} id:int Id of the tween you want to resume + * @example + * int id = LeanTween.moveX(gameObject, 5, 1.0).id
    + * LeanTween.pause( id );
    + * // Later....
    + * LeanTween.resume( id ); + */ + public static void resume( int uniqueId ){ + int backId = uniqueId & 0xFFFF; + int backCounter = uniqueId >> 16; + if(tweens[backId].counter==backCounter){ + tweens[backId].resume(); + } + } + + /** + * Resume all the tweens on a GameObject Resume all the tweens on a GameObject + * + * @method LeanTween.resume + * @param {GameObject} gameObject:GameObject GameObject whose tweens you want to resume + */ + public static void resume( GameObject gameObject ){ + Transform trans = gameObject.transform; + for(int i = 0; i <= tweenMaxSearch; i++){ + if(tweens[i].trans==trans) + tweens[i].resume(); + } + } + + /** + * Test whether or not a tween is active on a GameObject Test whether or not a tween is active on a GameObject + * + * @method LeanTween.isTweening + * @param {GameObject} gameObject:GameObject GameObject that you want to test if it is tweening + */ + public static bool isTweening( GameObject gameObject = null ){ + if(gameObject==null){ + for(int i = 0; i <= tweenMaxSearch; i++){ + if(tweens[i].toggle) + return true; + } + return false; + } + Transform trans = gameObject.transform; + for(int i = 0; i <= tweenMaxSearch; i++){ + if(tweens[i].toggle && tweens[i].trans==trans) + return true; + } + return false; + } + + public static bool isTweening( RectTransform rect ){ + return isTweening(rect.gameObject); + } + + /** + * Test whether or not a tween is active or not Test whether or not a tween is active or not + * + * @method LeanTween.isTweening + * @param {GameObject} id:int id of the tween that you want to test if it is tweening + * @example + * int id = LeanTween.moveX(gameObject, 1f, 3f).id;
    + * if(LeanTween.isTweening( id ))
    + *      Debug.Log("I am tweening!");
    + */ + public static bool isTweening( int uniqueId ){ + int backId = uniqueId & 0xFFFF; + int backCounter = uniqueId >> 16; + if (backId < 0 || backId >= maxTweens) return false; + // Debug.Log("tweens[backId].counter:"+tweens[backId].counter+" backCounter:"+backCounter +" toggle:"+tweens[backId].toggle); + if(tweens[backId].counter==backCounter && tweens[backId].toggle){ + return true; + } + return false; + } + + public static bool isTweening( LTRect ltRect ){ + for( int i = 0; i <= tweenMaxSearch; i++){ + if(tweens[i].toggle && tweens[i]._optional.ltRect==ltRect) + return true; + } + return false; + } + + public static void drawBezierPath(Vector3 a, Vector3 b, Vector3 c, Vector3 d, float arrowSize = 0.0f, Transform arrowTransform = null){ + Vector3 last = a; + Vector3 p; + Vector3 aa = (-a + 3*(b-c) + d); + Vector3 bb = 3*(a+c) - 6*b; + Vector3 cc = 3*(b-a); + + float t; + + if(arrowSize>0.0f){ + Vector3 beforePos = arrowTransform.position; + Quaternion beforeQ = arrowTransform.rotation; + float distanceTravelled = 0f; + + for(float k = 1.0f; k <= 120.0f; k++){ + t = k / 120.0f; + p = ((aa* t + (bb))* t + cc)* t + a; + Gizmos.DrawLine(last, p); + distanceTravelled += (p-last).magnitude; + if(distanceTravelled>1f){ + distanceTravelled = distanceTravelled - 1f; + /*float deltaY = p.y - last.y; + float deltaX = p.x - last.x; + float ang = Mathf.Atan(deltaY / deltaX); + Vector3 arrow = p + new Vector3( Mathf.Cos(ang+2.5f), Mathf.Sin(ang+2.5f), 0f)*0.5f; + Gizmos.DrawLine(p, arrow); + arrow = p + new Vector3( Mathf.Cos(ang+-2.5f), Mathf.Sin(ang+-2.5f), 0f)*0.5f; + Gizmos.DrawLine(p, arrow);*/ + + arrowTransform.position = p; + arrowTransform.LookAt( last, Vector3.forward ); + Vector3 to = arrowTransform.TransformDirection(Vector3.right); + // Debug.Log("to:"+to+" tweenEmpty.transform.position:"+arrowTransform.position); + Vector3 back = (last-p); + back = back.normalized; + Gizmos.DrawLine(p, p + (to + back)*arrowSize); + to = arrowTransform.TransformDirection(-Vector3.right); + Gizmos.DrawLine(p, p + (to + back)*arrowSize); + } + last = p; + } + + arrowTransform.position = beforePos; + arrowTransform.rotation = beforeQ; + }else{ + for(float k = 1.0f; k <= 30.0f; k++){ + t = k / 30.0f; + p = ((aa* t + (bb))* t + cc)* t + a; + Gizmos.DrawLine(last, p); + last = p; + } + } + } + + public static object logError( string error ){ + if(throwErrors) Debug.LogError(error); else Debug.Log(error); + return null; + } + + public static LTDescr options(LTDescr seed){ Debug.LogError("error this function is no longer used"); return null; } + public static LTDescr options(){ + init(); + + bool found = false; + // Debug.Log("Search start"); + for(j=0, i = startSearch; j <= maxTweens; i++){ + if(j >= maxTweens) + return logError("LeanTween - You have run out of available spaces for tweening. To avoid this error increase the number of spaces to available for tweening when you initialize the LeanTween class ex: LeanTween.init( "+(maxTweens*2)+" );") as LTDescr; + if(i>=maxTweens) + i = 0; + // Debug.Log("searching i:"+i); + if(tweens[i].toggle==false){ + if(i+1>tweenMaxSearch) + tweenMaxSearch = i+1; + startSearch = i + 1; + found = true; + break; + } + + j++; + } + if(found==false) + logError("no available tween found!"); + + // Debug.Log("new tween with i:"+i+" counter:"+tweens[i].counter+" tweenMaxSearch:"+tweenMaxSearch+" tween:"+tweens[i]); + tweens[i].reset(); + + global_counter++; + if(global_counter>0x8000) + global_counter = 0; + + tweens[i].setId( (uint)i, global_counter ); + + return tweens[i]; + } + + + public static GameObject tweenEmpty{ + get{ + init(maxTweens); + return _tweenEmpty; + } + } + + public static int startSearch = 0; + public static LTDescr d; + + private static LTDescr pushNewTween( GameObject gameObject, Vector3 to, float time, LTDescr tween ){ + init(maxTweens); + if(gameObject==null || tween==null) + return null; + + tween.trans = gameObject.transform; + tween.to = to; + tween.time = time; + + if (tween.time <= 0f) + tween.updateInternal(); + //tween.hasPhysics = gameObject.rigidbody!=null; + + return tween; + } + + #if !UNITY_3_5 && !UNITY_4_0 && !UNITY_4_0_1 && !UNITY_4_1 && !UNITY_4_2 && !UNITY_4_3 && !UNITY_4_5 + /** + * Play a sequence of images on a Unity UI Object Play a sequence of images on a Unity UI Object + * + * @method LeanTween.play + * @param {RectTransform} rectTransform:RectTransform RectTransform that you want to play the sequence of sprites on + * @param {Sprite[]} sprites:Sprite[] Sequence of sprites to be played + * @return {LTDescr} LTDescr an object that distinguishes the tween
    + * @example + * LeanTween.play(gameObject.GetComponent<RectTransform>(), sprites).setLoopPingPong(); + */ + public static LTDescr play(RectTransform rectTransform, UnityEngine.Sprite[] sprites){ + float defaultFrameRate = 0.25f; + float time = defaultFrameRate * sprites.Length; + return pushNewTween(rectTransform.gameObject, new Vector3((float)sprites.Length - 1.0f,0,0), time, options().setCanvasPlaySprite().setSprites( sprites ).setRepeat(-1)); + } + #endif + + /** + * Fade a gameobject's material to a certain alpha value. The material's shader needs to support alpha. Owl labs has some excellent efficient shaders. Fade a gameobject's material to a certain alpha value. + * + * @method LeanTween.alpha + * @param {GameObject} gameObject:GameObject Gameobject that you wish to fade + * @param {float} to:float the final alpha value (0-1) + * @param {float} time:float The time with which to fade the object + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * LeanTween.alpha(gameObject, 1f, 1f) .setDelay(1f); + */ + public static LTDescr alpha(GameObject gameObject, float to, float time){ + LTDescr lt = pushNewTween( gameObject, new Vector3(to,0,0), time, options().setAlpha() ); + + #if !UNITY_3_5 && !UNITY_4_0 && !UNITY_4_0_1 && !UNITY_4_1 && !UNITY_4_2 + SpriteRenderer ren = gameObject.GetComponent(); + lt.spriteRen = ren; + #endif + return lt; + } + + /** + * Retrieve a sequencer object where you can easily chain together tweens and methods one after another Retrieve a sequencer object where you can easily chain together tweens and methods one after another + * + * @method LeanTween.sequence + * @return {LTSeq} LTSeq an object that you can add tweens, methods and time on to + * @example + * var seq = LeanTween.sequence();
    + * seq.add(1f); // delay everything one second
    + * seq.add( () => { // fire an event before start
    + *  Debug.Log("I have started");
    + * });
    + * seq.add( LeanTween.move(cube1, Vector3.one * 10f, 1f) ); // do a tween
    + * seq.add( () => { // fire event after tween
    + *  Debug.Log("We are done now");
    + * });;
    + */ + public static LTSeq sequence( bool initSequence = true){ + init(maxTweens); + // Loop through and find available sequence + for (int i = 0; i < sequences.Length; i++) { +// Debug.Log("i:" + i + " sequences[i]:" + sequences[i]); + if (sequences[i].tween==null || sequences[i].tween.toggle == false) { + if (sequences[i].toggle == false) { + LTSeq seq = sequences[i]; + if (initSequence) { + seq.init((uint)(i + tweens.Length), global_counter); + + global_counter++; + if (global_counter > 0x8000) + global_counter = 0; + } else { + seq.reset(); + } + + return seq; + } + } + } + + return null; + } + + + /** + * Fade a GUI Object Fade a GUI Object + * + * @method LeanTween.alpha + * @param {LTRect} ltRect:LTRect LTRect that you wish to fade + * @param {float} to:float the final alpha value (0-1) + * @param {float} time:float The time with which to fade the object + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * LeanTween.alpha(ltRect, 1f, 1f) .setEase(LeanTweenType.easeInCirc); + */ + public static LTDescr alpha(LTRect ltRect, float to, float time){ + ltRect.alphaEnabled = true; + return pushNewTween( tweenEmpty, new Vector3(to,0f,0f), time, options().setGUIAlpha().setRect( ltRect ) ); + } + + + #if !UNITY_3_5 && !UNITY_4_0 && !UNITY_4_0_1 && !UNITY_4_1 && !UNITY_4_2 && !UNITY_4_3 && !UNITY_4_5 + /** + * Fade a Unity UI Object Fade a Unity UI Object + * + * @method LeanTween.alphaText + * @param {RectTransform} rectTransform:RectTransform RectTransform associated with the Text Component you wish to fade + * @param {float} to:float the final alpha value (0-1) + * @param {float} time:float The time with which to fade the object + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * LeanTween.alphaText(gameObject.GetComponent<RectTransform>(), 1f, 1f) .setEase(LeanTweenType.easeInCirc); + */ + public static LTDescr textAlpha(RectTransform rectTransform, float to, float time){ + return pushNewTween(rectTransform.gameObject, new Vector3(to,0,0), time, options().setTextAlpha()); + } + public static LTDescr alphaText(RectTransform rectTransform, float to, float time){ + return pushNewTween(rectTransform.gameObject, new Vector3(to,0,0), time, options().setTextAlpha()); + } + + /** + * Fade a Unity UI Canvas Group Fade a Unity UI Canvas Group + * + * @method LeanTween.alphaCanvas + * @param {RectTransform} rectTransform:RectTransform RectTransform that the CanvasGroup is attached to + * @param {float} to:float the final alpha value (0-1) + * @param {float} time:float The time with which to fade the object + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * LeanTween.alphaCanvas(gameObject.GetComponent<RectTransform>(), 0f, 1f) .setLoopPingPong(); + */ + public static LTDescr alphaCanvas(CanvasGroup canvasGroup, float to, float time){ + return pushNewTween(canvasGroup.gameObject, new Vector3(to,0,0), time, options().setCanvasGroupAlpha()); + } + #endif + + /** + * This works by tweening the vertex colors directly.
    This works by tweening the vertex colors directly +
    + Vertex-based coloring is useful because you avoid making a copy of your + object's material for each instance that needs a different color.
    +
    + A shader that supports vertex colors is required for it to work + (for example the shaders in Mobile/Particles/) + * + * @method LeanTween.alphaVertex + * @param {GameObject} gameObject:GameObject Gameobject that you wish to alpha + * @param {float} to:float The alpha value you wish to tween to + * @param {float} time:float The time with which to delay before calling the function + * @return {LTDescr} LTDescr an object that distinguishes the tween + */ + public static LTDescr alphaVertex(GameObject gameObject, float to, float time){ + return pushNewTween( gameObject, new Vector3(to,0f,0f), time, options().setAlphaVertex() ); + } + + /** + * Change a gameobject's material to a certain color value. The material's shader needs to support color tinting. Owl labs has some excellent efficient shaders. Change a gameobject's material to a certain color value + * + * @method LeanTween.color + * @param {GameObject} gameObject:GameObject Gameobject that you wish to change the color + * @param {Color} to:Color the final color value ex: Color.Red, new Color(1.0f,1.0f,0.0f,0.8f) + * @param {float} time:float The time with which to fade the object + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * LeanTween.color(gameObject, Color.yellow, 1f) .setDelay(1f); + */ + public static LTDescr color(GameObject gameObject, Color to, float time){ + LTDescr lt = pushNewTween( gameObject, new Vector3(1.0f, to.a, 0.0f), time, options().setColor().setPoint( new Vector3(to.r, to.g, to.b) ) ); + #if !UNITY_3_5 && !UNITY_4_0 && !UNITY_4_0_1 && !UNITY_4_1 && !UNITY_4_2 + SpriteRenderer ren = gameObject.GetComponent(); + lt.spriteRen = ren; + #endif + return lt; + } + + #if !UNITY_3_5 && !UNITY_4_0 && !UNITY_4_0_1 && !UNITY_4_1 && !UNITY_4_2 && !UNITY_4_3 && !UNITY_4_5 + /** + * Change the color a Unity UI Object Change the color a Unity UI Object + * + * @method LeanTween.colorText + * @param {RectTransform} rectTransform:RectTransform RectTransform attached to the Text Component whose color you want to change + * @param {Color} to:Color the final alpha value ex: Color.Red, new Color(1.0f,1.0f,0.0f,0.8f) + * @param {float} time:float The time with which to fade the object + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * LeanTween.colorText(gameObject.GetComponent<RectTransform>(), Color.yellow, 1f) .setDelay(1f); + */ + public static LTDescr textColor(RectTransform rectTransform, Color to, float time){ + return pushNewTween(rectTransform.gameObject, new Vector3(1.0f, to.a, 0.0f), time, options().setTextColor().setPoint(new Vector3(to.r, to.g, to.b))); + } + public static LTDescr colorText(RectTransform rectTransform, Color to, float time){ + return pushNewTween(rectTransform.gameObject, new Vector3(1.0f, to.a, 0.0f), time, options().setTextColor().setPoint(new Vector3(to.r, to.g, to.b))); + } + #endif + + /** + * Call a method after a specified amount of time Call a method after a specified amount of time + * + * @method LeanTween.delayedCall + * @param {GameObject} gameObject:GameObject Gameobject that you wish to associate with this delayed call + * @param {float} time:float delay The time you wish to pass before the method is called + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example LeanTween.delayedCall(gameObject, 1f, ()=>{
    Debug.Log("I am called one second later!");
    })); + */ + public static LTDescr delayedCall( float delayTime, Action callback){ + return pushNewTween( tweenEmpty, Vector3.zero, delayTime, options().setCallback().setOnComplete(callback) ); + } + + public static LTDescr delayedCall( float delayTime, Action callback){ + return pushNewTween( tweenEmpty, Vector3.zero, delayTime, options().setCallback().setOnComplete(callback) ); + } + + public static LTDescr delayedCall( GameObject gameObject, float delayTime, Action callback){ + return pushNewTween( gameObject, Vector3.zero, delayTime, options().setCallback().setOnComplete(callback) ); + } + + public static LTDescr delayedCall( GameObject gameObject, float delayTime, Action callback){ + return pushNewTween( gameObject, Vector3.zero, delayTime, options().setCallback().setOnComplete(callback) ); + } + + public static LTDescr destroyAfter( LTRect rect, float delayTime){ + return pushNewTween( tweenEmpty, Vector3.zero, delayTime, options().setCallback().setRect( rect ).setDestroyOnComplete(true) ); + } + + /*public static LTDescr delayedCall(GameObject gameObject, float delayTime, string callback){ + return pushNewTween( gameObject, Vector3.zero, delayTime, TweenAction.CALLBACK, options().setOnComplete( callback ) ); + }*/ + + + /** + * Move a GameObject to a certain location Move a GameObject to a certain location + * + * @method LeanTween.move + * @param {GameObject} gameObject:GameObject Gameobject that you wish to move + * @param {Vector3} vec:Vector3 to The final positin with which to move to + * @param {float} time:float time The time to complete the tween in + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example LeanTween.move(gameObject, new Vector3(0f,-3f,5f), 2.0f) .setEase( LeanTweenType.easeOutQuad ); + */ + public static LTDescr move(GameObject gameObject, Vector3 to, float time){ + return pushNewTween( gameObject, to, time, options().setMove() ); + } + public static LTDescr move(GameObject gameObject, Vector2 to, float time){ + return pushNewTween( gameObject, new Vector3(to.x, to.y, gameObject.transform.position.z), time, options().setMove() ); + } + + + /** + * Move a GameObject along a set of bezier curves Move a GameObject along a set of bezier curves + * + * @method LeanTween.move + * @param {GameObject} gameObject:GameObject Gameobject that you wish to move + * @param {Vector3[]} path:Vector3[] A set of points that define the curve(s) ex: Point1,Handle2,Handle1,Point2,... + * @param {float} time:float The time to complete the tween in + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * Javascript:
    + * LeanTween.move(gameObject, [Vector3(0,0,0),Vector3(1,0,0),Vector3(1,0,0),Vector3(1,0,1)], 2.0) .setEase(LeanTweenType.easeOutQuad).setOrientToPath(true);

    + * C#:
    + * LeanTween.move(gameObject, new Vector3[]{new Vector3(0f,0f,0f),new Vector3(1f,0f,0f),new Vector3(1f,0f,0f),new Vector3(1f,0f,1f)}, 1.5f).setEase(LeanTweenType.easeOutQuad).setOrientToPath(true);;
    + */ + public static LTDescr move(GameObject gameObject, Vector3[] to, float time){ + d = options().setMoveCurved(); + if(d.optional.path==null) + d.optional.path = new LTBezierPath( to ); + else + d.optional.path.setPoints( to ); + + return pushNewTween( gameObject, new Vector3(1.0f,0.0f,0.0f), time, d ); + } + + public static LTDescr move(GameObject gameObject, LTBezierPath to, float time) { + d = options().setMoveCurved(); + d.optional.path = to; + + return pushNewTween(gameObject, new Vector3(1.0f, 0.0f, 0.0f), time, d); + } + + public static LTDescr move(GameObject gameObject, LTSpline to, float time) { + d = options().setMoveSpline(); + d.optional.spline = to; + + return pushNewTween(gameObject, new Vector3(1.0f, 0.0f, 0.0f), time, d); + } + + /** + * Move a GameObject through a set of points Move a GameObject through a set of points + * + * @method LeanTween.moveSpline + * @param {GameObject} gameObject:GameObject Gameobject that you wish to move + * @param {Vector3[]} path:Vector3[] A set of points that define the curve(s) ex: ControlStart,Pt1,Pt2,Pt3,.. ..ControlEnd
    Note: The first and last item just define the angle of the end points, they are not actually used in the spline path itself. If you do not care about the angle you can jus set the first two items and last two items as the same value. + * @param {float} time:float The time to complete the tween in + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * Javascript:
    + * LeanTween.moveSpline(gameObject, [Vector3(0,0,0),Vector3(1,0,0),Vector3(1,0,0),Vector3(1,0,1)], 2.0) .setEase(LeanTweenType.easeOutQuad).setOrientToPath(true);

    + * C#:
    + * LeanTween.moveSpline(gameObject, new Vector3[]{new Vector3(0f,0f,0f),new Vector3(1f,0f,0f),new Vector3(1f,0f,0f),new Vector3(1f,0f,1f)}, 1.5f).setEase(LeanTweenType.easeOutQuad).setOrientToPath(true);
    + */ + public static LTDescr moveSpline(GameObject gameObject, Vector3[] to, float time){ + d = options().setMoveSpline(); + d.optional.spline = new LTSpline( to ); + + return pushNewTween( gameObject, new Vector3(1.0f,0.0f,0.0f), time, d ); + } + + /** + * Move a GameObject through a set of points Move a GameObject through a set of points + * + * @method LeanTween.moveSpline + * @param {GameObject} gameObject:GameObject Gameobject that you wish to move + * @param {LTSpline} spline:LTSpline pass a pre-existing LTSpline for the object to move along + * @param {float} time:float The time to complete the tween in + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * Javascript:
    + * LeanTween.moveSpline(gameObject, ltSpline, 2.0) .setEase(LeanTweenType.easeOutQuad).setOrientToPath(true);

    + * C#:
    + * LeanTween.moveSpline(gameObject, ltSpline, 1.5f).setEase(LeanTweenType.easeOutQuad).setOrientToPath(true);
    + */ + public static LTDescr moveSpline(GameObject gameObject, LTSpline to, float time){ + d = options().setMoveSpline(); + d.optional.spline = to; + + return pushNewTween( gameObject, new Vector3(1.0f,0.0f,0.0f), time, d ); + } + + /** + * Move a GameObject through a set of points, in local space Move a GameObject through a set of points, in local space + * + * @method LeanTween.moveSplineLocal + * @param {GameObject} gameObject:GameObject Gameobject that you wish to move + * @param {Vector3[]} path:Vector3[] A set of points that define the curve(s) ex: ControlStart,Pt1,Pt2,Pt3,.. ..ControlEnd + * @param {float} time:float The time to complete the tween in + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * Javascript:
    + * LeanTween.moveSpline(gameObject, [Vector3(0,0,0),Vector3(1,0,0),Vector3(1,0,0),Vector3(1,0,1)], 2.0) .setEase(LeanTweenType.easeOutQuad).setOrientToPath(true);

    + * C#:
    + * LeanTween.moveSpline(gameObject, new Vector3[]{new Vector3(0f,0f,0f),new Vector3(1f,0f,0f),new Vector3(1f,0f,0f),new Vector3(1f,0f,1f)}, 1.5f).setEase(LeanTweenType.easeOutQuad).setOrientToPath(true);
    + */ + public static LTDescr moveSplineLocal(GameObject gameObject, Vector3[] to, float time){ + d = options().setMoveSplineLocal(); + d.optional.spline = new LTSpline( to ); + + return pushNewTween( gameObject, new Vector3(1.0f,0.0f,0.0f), time, d ); + } + + /** + * Move a GUI Element to a certain location Move a GUI Element to a certain location + * + * @method LeanTween.move (GUI) + * @param {LTRect} ltRect:LTRect ltRect LTRect object that you wish to move + * @param {Vector2} vec:Vector2 to The final position with which to move to (pixel coordinates) + * @param {float} time:float time The time to complete the tween in + * @return {LTDescr} LTDescr an object that distinguishes the tween + */ + public static LTDescr move(LTRect ltRect, Vector2 to, float time){ + return pushNewTween( tweenEmpty, to, time, options().setGUIMove().setRect( ltRect ) ); + } + + public static LTDescr moveMargin(LTRect ltRect, Vector2 to, float time){ + return pushNewTween( tweenEmpty, to, time, options().setGUIMoveMargin().setRect( ltRect ) ); + } + + /** + * Move a GameObject along the x-axis Move a GameObject along the x-axis + * + * @method LeanTween.moveX + * @param {GameObject} gameObject:GameObject gameObject Gameobject that you wish to move + * @param {float} to:float to The final position with which to move to + * @param {float} time:float time The time to complete the move in + * @return {LTDescr} LTDescr an object that distinguishes the tween + */ + public static LTDescr moveX(GameObject gameObject, float to, float time){ + return pushNewTween( gameObject, new Vector3(to,0,0), time, options().setMoveX() ); + } + + /** + * Move a GameObject along the y-axis Move a GameObject along the y-axis + * + * @method LeanTween.moveY + * @param {GameObject} GameObject gameObject Gameobject that you wish to move + * @param {float} float to The final position with which to move to + * @param {float} float time The time to complete the move in + * @return {LTDescr} LTDescr an object that distinguishes the tween + */ + public static LTDescr moveY(GameObject gameObject, float to, float time){ + return pushNewTween( gameObject, new Vector3(to,0,0), time, options().setMoveY() ); + } + + /** + * Move a GameObject along the z-axis Move a GameObject along the z-axis + * + * @method LeanTween.moveZ + * @param {GameObject} GameObject gameObject Gameobject that you wish to move + * @param {float} float to The final position with which to move to + * @param {float} float time The time to complete the move in + * @return {LTDescr} LTDescr an object that distinguishes the tween + */ + public static LTDescr moveZ(GameObject gameObject, float to, float time){ + return pushNewTween( gameObject, new Vector3(to,0,0), time, options().setMoveZ() ); + } + + /** + * Move a GameObject to a certain location relative to the parent transform. Move a GameObject to a certain location relative to the parent transform. + * + * @method LeanTween.moveLocal + * @param {GameObject} GameObject gameObject Gameobject that you wish to rotate + * @param {Vector3} Vector3 to The final positin with which to move to + * @param {float} float time The time to complete the tween in + * @return {LTDescr} LTDescr an object that distinguishes the tween + */ + public static LTDescr moveLocal(GameObject gameObject, Vector3 to, float time){ + return pushNewTween( gameObject, to, time, options().setMoveLocal() ); + } + + /** + * Move a GameObject along a set of bezier curves, in local space Move a GameObject along a set of bezier curves, in local space + * + * @method LeanTween.moveLocal + * @param {GameObject} gameObject:GameObject Gameobject that you wish to move + * @param {Vector3[]} path:Vector3[] A set of points that define the curve(s) ex: Point1,Handle1,Handle2,Point2,... + * @param {float} time:float The time to complete the tween in + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * Javascript:
    + * LeanTween.moveLocal(gameObject, [Vector3(0,0,0),Vector3(1,0,0),Vector3(1,0,0),Vector3(1,0,1)], 2.0).setEase(LeanTweenType.easeOutQuad).setOrientToPath(true);

    + * C#:
    + * LeanTween.moveLocal(gameObject, new Vector3[]{Vector3(0f,0f,0f),Vector3(1f,0f,0f),Vector3(1f,0f,0f),Vector3(1f,0f,1f)}).setEase(LeanTweenType.easeOutQuad).setOrientToPath(true);
    + */ + public static LTDescr moveLocal(GameObject gameObject, Vector3[] to, float time){ + d = options().setMoveCurvedLocal(); + if(d.optional.path==null) + d.optional.path = new LTBezierPath( to ); + else + d.optional.path.setPoints( to ); + + return pushNewTween( gameObject, new Vector3(1.0f,0.0f,0.0f), time, d ); + } + + public static LTDescr moveLocalX(GameObject gameObject, float to, float time){ + return pushNewTween( gameObject, new Vector3(to,0,0), time, options().setMoveLocalX() ); + } + + public static LTDescr moveLocalY(GameObject gameObject, float to, float time){ + return pushNewTween( gameObject, new Vector3(to,0,0), time, options().setMoveLocalY() ); + } + + public static LTDescr moveLocalZ(GameObject gameObject, float to, float time){ + return pushNewTween( gameObject, new Vector3(to,0,0), time, options().setMoveLocalZ() ); + } + + public static LTDescr moveLocal(GameObject gameObject, LTBezierPath to, float time) { + d = options().setMoveCurvedLocal(); + d.optional.path = to; + + return pushNewTween(gameObject, new Vector3(1.0f, 0.0f, 0.0f), time, d); + } + public static LTDescr moveLocal(GameObject gameObject, LTSpline to, float time) { + d = options().setMoveSplineLocal(); + d.optional.spline = to; + + return pushNewTween(gameObject, new Vector3(1.0f, 0.0f, 0.0f), time, d); + } + + /** + * Move a GameObject to another transform Move a GameObject to another transform + * + * @method LeanTween.move + * @param {GameObject} gameObject:GameObject Gameobject that you wish to move + * @param {Transform} destination:Transform Transform whose position the tween will finally end on + * @param {float} time:float time The time to complete the tween in + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example LeanTween.move(gameObject, anotherTransform, 2.0f) .setEase( LeanTweenType.easeOutQuad ); + */ + public static LTDescr move(GameObject gameObject, Transform to, float time){ + return pushNewTween(gameObject, Vector3.zero, time, options().setTo(to).setMoveToTransform() ); + } + + /** + * Rotate a GameObject, to values are in passed in degrees Rotate a GameObject, to values are in passed in degrees + * + * @method LeanTween.rotate + * @param {GameObject} GameObject gameObject Gameobject that you wish to rotate + * @param {Vector3} Vector3 to The final rotation with which to rotate to + * @param {float} float time The time to complete the tween in + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example LeanTween.rotate(cube, new Vector3(180f,30f,0f), 1.5f); + */ + + public static LTDescr rotate(GameObject gameObject, Vector3 to, float time){ + return pushNewTween( gameObject, to, time, options().setRotate() ); + } + + /** + * Rotate a GUI element (using an LTRect object), to a value that is in degrees Rotate a GUI element (using an LTRect object), to a value that is in degrees + * + * @method LeanTween.rotate + * @param {LTRect} ltRect:LTRect LTRect that you wish to rotate + * @param {float} to:float The final rotation with which to rotate to + * @param {float} time:float The time to complete the tween in + * @param {Array} optional:Array Object Array where you can pass optional items. + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * if(GUI.Button(buttonRect.rect, "Rotate"))
    + * LeanTween.rotate( buttonRect4, 150.0f, 1.0f).setEase(LeanTweenType.easeOutElastic);
    + * GUI.matrix = Matrix4x4.identity;
    + */ + public static LTDescr rotate(LTRect ltRect, float to, float time){ + return pushNewTween( tweenEmpty, new Vector3(to,0f,0f), time, options().setGUIRotate().setRect( ltRect ) ); + } + + /** + * Rotate a GameObject in the objects local space (on the transforms localEulerAngles object) Rotate a GameObject in the objects local space (on the transforms localEulerAngles object) + * + * @method LeanTween.rotateLocal + * @param {GameObject} gameObject:GameObject Gameobject that you wish to rotate + * @param {Vector3} to:Vector3 The final rotation with which to rotate to + * @param {float} time:float The time to complete the rotation in + * @return {LTDescr} LTDescr an object that distinguishes the tween + */ + public static LTDescr rotateLocal(GameObject gameObject, Vector3 to, float time){ + return pushNewTween( gameObject, to, time, options().setRotateLocal() ); + } + + /** + * Rotate a GameObject only on the X axis Rotate a GameObject only on the X axis + * + * @method LeanTween.rotateX + * @param {GameObject} GameObject Gameobject that you wish to rotate + * @param {float} to:float The final x-axis rotation with which to rotate + * @param {float} time:float The time to complete the rotation in + * @return {LTDescr} LTDescr an object that distinguishes the tween + */ + public static LTDescr rotateX(GameObject gameObject, float to, float time){ + return pushNewTween( gameObject, new Vector3(to,0,0), time, options().setRotateX() ); + } + + /** + * Rotate a GameObject only on the Y axis Rotate a GameObject only on the Y axis + * + * @method LeanTween.rotateY + * @param {GameObject} GameObject Gameobject that you wish to rotate + * @param {float} to:float The final y-axis rotation with which to rotate + * @param {float} time:float The time to complete the rotation in + * @return {LTDescr} LTDescr an object that distinguishes the tween + */ + public static LTDescr rotateY(GameObject gameObject, float to, float time){ + return pushNewTween( gameObject, new Vector3(to,0,0), time, options().setRotateY() ); + } + + /** + * Rotate a GameObject only on the Z axis Rotate a GameObject only on the Z axis + * + * @method LeanTween.rotateZ + * @param {GameObject} GameObject Gameobject that you wish to rotate + * @param {float} to:float The final z-axis rotation with which to rotate + * @param {float} time:float The time to complete the rotation in + * @return {LTDescr} LTDescr an object that distinguishes the tween + */ + public static LTDescr rotateZ(GameObject gameObject, float to, float time){ + return pushNewTween( gameObject, new Vector3(to,0,0), time, options().setRotateZ() ); + } + + /** + * Rotate a GameObject around a certain Axis (the best method to use when you want to rotate beyond 180 degrees) Rotate a GameObject around a certain Axis (the best method to use when you want to rotate beyond 180 degrees) + * + * @method LeanTween.rotateAround + * @param {GameObject} gameObject:GameObject Gameobject that you wish to rotate + * @param {Vector3} vec:Vector3 axis in which to rotate around ex: Vector3.up + * @param {float} degrees:float the degrees in which to rotate + * @param {float} time:float time The time to complete the rotation in + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * Example:
    + * LeanTween.rotateAround ( gameObject, Vector3.left, 90f, 1f ); + */ + public static LTDescr rotateAround(GameObject gameObject, Vector3 axis, float add, float time){ + return pushNewTween( gameObject, new Vector3(add,0f,0f), time, options().setAxis(axis).setRotateAround() ); + } + + /** + * Rotate a GameObject around a certain Axis in Local Space (the best method to use when you want to rotate beyond 180 degrees) Rotate a GameObject around a certain Axis in Local Space (the best method to use when you want to rotate beyond 180 degrees) + * + * @method LeanTween.rotateAroundLocal + * @param {GameObject} gameObject:GameObject Gameobject that you wish to rotate + * @param {Vector3} vec:Vector3 axis in which to rotate around ex: Vector3.up + * @param {float} degrees:float the degrees in which to rotate + * @param {float} time:float time The time to complete the rotation in + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * Example:
    + * LeanTween.rotateAround ( gameObject, Vector3.left, 90f, 1f ); + */ + public static LTDescr rotateAroundLocal(GameObject gameObject, Vector3 axis, float add, float time){ + return pushNewTween( gameObject, new Vector3(add,0f,0f), time, options().setRotateAroundLocal().setAxis(axis) ); + } + + /** + * Scale a GameObject to a certain size Scale a GameObject to a certain size + * + * @method LeanTween.scale + * @param {GameObject} gameObject:GameObject gameObject Gameobject that you wish to scale + * @param {Vector3} vec:Vector3 to The size with which to tween to + * @param {float} time:float time The time to complete the tween in + * @return {LTDescr} LTDescr an object that distinguishes the tween + */ + public static LTDescr scale(GameObject gameObject, Vector3 to, float time){ + return pushNewTween( gameObject, to, time, options().setScale() ); + } + + /** + * Scale a GUI Element to a certain width and height Scale a GUI Element to a certain width and height + * + * @method LeanTween.scale (GUI) + * @param {LTRect} LTRect ltRect LTRect object that you wish to move + * @param {Vector2} Vector2 to The final width and height to scale to (pixel based) + * @param {float} float time The time to complete the tween in + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * Example Javascript:
    + * var bRect:LTRect = new LTRect( 0, 0, 100, 50 );
    + * LeanTween.scale( bRect, Vector2(bRect.rect.width, bRect.rect.height) * 1.3, 0.25 ).setEase(LeanTweenType.easeOutBounce);
    + * function OnGUI(){
    + *   if(GUI.Button(bRect.rect, "Scale")){ }
    + * }
    + *
    + * Example C#:
    + * LTRect bRect = new LTRect( 0f, 0f, 100f, 50f );
    + * LeanTween.scale( bRect, new Vector2(150f,75f), 0.25f ).setEase(LeanTweenType.easeOutBounce);
    + * void OnGUI(){
    + *   if(GUI.Button(bRect.rect, "Scale")){ }
    + * }
    + */ + public static LTDescr scale(LTRect ltRect, Vector2 to, float time){ + return pushNewTween( tweenEmpty, to, time, options().setGUIScale().setRect( ltRect ) ); + } + + /** + * Scale a GameObject to a certain size along the x-axis only Scale a GameObject to a certain size along the x-axis only + * + * @method LeanTween.scaleX + * @param {GameObject} gameObject:GameObject Gameobject that you wish to scale + * @param {float} scaleTo:float the size with which to scale to + * @param {float} time:float the time to complete the tween in + * @return {LTDescr} LTDescr an object that distinguishes the tween + */ + public static LTDescr scaleX(GameObject gameObject, float to, float time){ + return pushNewTween( gameObject, new Vector3(to,0,0), time, options().setScaleX() ); + } + + /** + * Scale a GameObject to a certain size along the y-axis only Scale a GameObject to a certain size along the y-axis only + * + * @method LeanTween.scaleY + * @param {GameObject} gameObject:GameObject Gameobject that you wish to scale + * @param {float} scaleTo:float the size with which to scale to + * @param {float} time:float the time to complete the tween in + * @return {LTDescr} LTDescr an object that distinguishes the tween + */ + public static LTDescr scaleY(GameObject gameObject, float to, float time){ + return pushNewTween( gameObject, new Vector3(to,0,0), time, options().setScaleY() ); + } + + /** + * Scale a GameObject to a certain size along the z-axis only Scale a GameObject to a certain size along the z-axis only + * + * @method LeanTween.scaleZ + * @param {GameObject} gameObject:GameObject Gameobject that you wish to scale + * @param {float} scaleTo:float the size with which to scale to + * @param {float} time:float the time to complete the tween in + * @return {LTDescr} LTDescr an object that distinguishes the tween + */ + public static LTDescr scaleZ(GameObject gameObject, float to, float time){ + return pushNewTween( gameObject, new Vector3(to,0,0), time, options().setScaleZ()); + } + + /** + * Tween any particular value (float) Tween any particular value (float) + * + * @method LeanTween.value (float) + * @param {GameObject} gameObject:GameObject Gameobject that you wish to attach the tween to + * @param {float} from:float The original value to start the tween from + * @param {Vector3} to:float The final float with which to tween to + * @param {float} time:float The time to complete the tween in + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * Example Javascript:
    + * LeanTween.value( gameObject, 1f, 5f, 5f).setOnUpdate( function( val:float ){
    + *  Debug.Log("tweened val:"+val);
    + * } );
    + *
    + * Example C#:
    + * LeanTween.value( gameObject, 1f, 5f, 5f).setOnUpdate( (float val)=>{
    + *  Debug.Log("tweened val:"+val);
    + * } );
    + */ + public static LTDescr value(GameObject gameObject, float from, float to, float time){ + return pushNewTween( gameObject, new Vector3(to,0,0), time, options().setCallback().setFrom( new Vector3(from,0,0) ) ); + } + public static LTDescr value(float from, float to, float time){ + return pushNewTween( tweenEmpty, new Vector3(to,0,0), time, options().setCallback().setFrom( new Vector3(from,0,0) ) ); + } + + /** + * Tween any particular value (Vector2) + * + * @method LeanTween.value (Vector2) + * @param {GameObject} gameObject:GameObject Gameobject that you wish to attach the tween to + * @param {Vector2} from:Vector2 The original value to start the tween from + * @param {Vector3} to:Vector2 The final Vector2 with which to tween to + * @param {float} time:float The time to complete the tween in + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * Example Javascript:
    + * LeanTween.value( gameObject, new Vector2(1f,0f), new Vector3(5f,0f), 5f).setOnUpdate( function( val:Vector2 ){
    + *  Debug.Log("tweened val:"+val);
    + * } );
    + *
    + * Example C#:
    + * LeanTween.value( gameObject, new Vector3(1f,0f), new Vector3(5f,0f), 5f).setOnUpdate( (Vector2 val)=>{
    + *  Debug.Log("tweened val:"+val);
    + * } );
    + */ + public static LTDescr value(GameObject gameObject, Vector2 from, Vector2 to, float time){ + return pushNewTween( gameObject, new Vector3(to.x,to.y,0), time, options().setValue3().setTo( new Vector3(to.x,to.y,0f) ).setFrom( new Vector3(from.x,from.y,0) ) ); + } + + /** + * Tween any particular value (Vector3) + * + * @method LeanTween.value (Vector3) + * @param {GameObject} gameObject:GameObject Gameobject that you wish to attach the tween to + * @param {Vector3} from:Vector3 The original value to start the tween from + * @param {Vector3} to:Vector3 The final Vector3 with which to tween to + * @param {float} time:float The time to complete the tween in + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * Example Javascript:
    + * LeanTween.value( gameObject, new Vector3(1f,0f,0f), new Vector3(5f,0f,0f), 5f).setOnUpdate( function( val:Vector3 ){
    + *  Debug.Log("tweened val:"+val);
    + * } );
    + *
    + * Example C#:
    + * LeanTween.value( gameObject, new Vector3(1f,0f,0f), new Vector3(5f,0f,0f), 5f).setOnUpdate( (Vector3 val)=>{
    + *  Debug.Log("tweened val:"+val);
    + * } );
    + */ + public static LTDescr value(GameObject gameObject, Vector3 from, Vector3 to, float time){ + return pushNewTween( gameObject, to, time, options().setValue3().setFrom( from ) ); + } + + /** + * Tween any particular value (Color) + * + * @method LeanTween.value (Color) + * @param {GameObject} gameObject:GameObject Gameobject that you wish to attach the tween to + * @param {Color} from:Color The original value to start the tween from + * @param {Color} to:Color The final Color with which to tween to + * @param {float} time:float The time to complete the tween in + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * Example Javascript:
    + * LeanTween.value( gameObject, Color.red, Color.yellow, 5f).setOnUpdate( function( val:Color ){
    + *  Debug.Log("tweened val:"+val);
    + * } );
    + *
    + * Example C#:
    + * LeanTween.value( gameObject, Color.red, Color.yellow, 5f).setOnUpdate( (Color val)=>{
    + *  Debug.Log("tweened val:"+val);
    + * } );
    + */ + public static LTDescr value(GameObject gameObject, Color from, Color to, float time){ + LTDescr lt = pushNewTween( gameObject, new Vector3(1f, to.a, 0f), time, options().setCallbackColor().setPoint( new Vector3(to.r, to.g, to.b) ) + .setFromColor(from).setHasInitialized(false) ); + + #if !UNITY_3_5 && !UNITY_4_0 && !UNITY_4_0_1 && !UNITY_4_1 && !UNITY_4_2 + SpriteRenderer ren = gameObject.GetComponent(); + lt.spriteRen = ren; + #endif + return lt; + } + + /** + * Tween any particular value, it does not need to be tied to any particular type or GameObject + * + * @method LeanTween.value (float) + * @param {GameObject} GameObject gameObject GameObject with which to tie the tweening with. This is only used when you need to cancel this tween, it does not actually perform any operations on this gameObject + * @param {Action} callOnUpdate:Action The function that is called on every Update frame, this function needs to accept a float value ex: function updateValue( float val ){ } + * @param {float} float from The original value to start the tween from + * @param {float} float to The value to end the tween on + * @param {float} float time The time to complete the tween in + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * Example Javascript:
    + * LeanTween.value( gameObject, updateValueExampleCallback, 180f, 270f, 1f).setEase(LeanTweenType.easeOutElastic);
    + * function updateValueExampleCallback( val:float ){
    + *   Debug.Log("tweened value:"+val+" set this to whatever variable you are tweening...");
    + * }
    + *
    + * Example C#:
    + * LeanTween.value( gameObject, updateValueExampleCallback, 180f, 270f, 1f).setEase(LeanTweenType.easeOutElastic);
    + * void updateValueExampleCallback( float val ){
    + *   Debug.Log("tweened value:"+val+" set this to whatever variable you are tweening...");
    + * }
    + */ + + public static LTDescr value(GameObject gameObject, Action callOnUpdate, float from, float to, float time){ + return pushNewTween( gameObject, new Vector3(to,0,0), time, options().setCallback().setTo( new Vector3(to,0,0) ).setFrom( new Vector3(from,0,0) ).setOnUpdate(callOnUpdate) ); + } + + /** + * Tweens any float value, it does not need to be tied to any particular type or GameObject + * + * @method LeanTween.value (float) + * @param {GameObject} GameObject gameObject GameObject with which to tie the tweening with. This is only used when you need to cancel this tween, it does not actually perform any operations on this gameObject + * @param {Action} callOnUpdateRatio:Action Function that's called every Update frame. It must accept two float values ex: function updateValue( float val, float ratio){ } + * @param {float} float from The original value to start the tween from + * @param {float} float to The value to end the tween on + * @param {float} float time The time to complete the tween in + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * Example Javascript:
    + * LeanTween.value( gameObject, updateValueExampleCallback, 180f, 270f, 1f).setEase(LeanTweenType.easeOutElastic);
    + * function updateValueExampleCallback( val:float, ratio:float ){
    + *   Debug.Log("tweened value:"+val+" percent complete:"+ratio*100);
    + * }
    + *
    + * Example C#:
    + * LeanTween.value( gameObject, updateValueExampleCallback, 180f, 270f, 1f).setEase(LeanTweenType.easeOutElastic);
    + * void updateValueExampleCallback( float val, float ratio ){
    + *   Debug.Log("tweened value:"+val+" percent complete:"+ratio*100);
    + * }
    + */ + + public static LTDescr value(GameObject gameObject, Action callOnUpdateRatio, float from, float to, float time) { + return pushNewTween(gameObject, new Vector3(to, 0, 0), time, options().setCallback().setTo(new Vector3(to, 0, 0)).setFrom(new Vector3(from, 0, 0)).setOnUpdateRatio(callOnUpdateRatio)); + } + + /** + * Tween from one color to another + * + * @method LeanTween.value (Color) + * @param {GameObject} GameObject gameObject GameObject with which to tie the tweening with. This is only used when you need to cancel this tween, it does not actually perform any operations on this gameObject + * @param {Action} callOnUpdate:Action The function that is called on every Update frame, this function needs to accept a color value ex: function updateValue( Color val ){ } + * @param {Color} Color from The original value to start the tween from + * @param {Color} Color to The value to end the tween on + * @param {Color} Color time The time to complete the tween in + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example + * Example Javascript:
    + * LeanTween.value( gameObject, updateValueExampleCallback, Color.red, Color.green, 1f).setEase(LeanTweenType.easeOutElastic);
    + * function updateValueExampleCallback( val:Color ){
    + *   Debug.Log("tweened color:"+val+" set this to whatever variable you are tweening...");
    + * }
    + *
    + * Example C#:
    + * LeanTween.value( gameObject, updateValueExampleCallback, Color.red, Color.green, 1f).setEase(LeanTweenType.easeOutElastic);
    + * void updateValueExampleCallback( Color val ){
    + *   Debug.Log("tweened color:"+val+" set this to whatever variable you are tweening...");
    + * }
    + */ + + public static LTDescr value(GameObject gameObject, Action callOnUpdate, Color from, Color to, float time){ + return pushNewTween( gameObject, new Vector3(1.0f,to.a,0.0f), time, options().setCallbackColor().setPoint( new Vector3(to.r, to.g, to.b) ) + .setAxis( new Vector3(from.r, from.g, from.b) ).setFrom( new Vector3(0.0f, from.a, 0.0f) ).setHasInitialized(false).setOnUpdateColor(callOnUpdate) ); + } + public static LTDescr value(GameObject gameObject, Action callOnUpdate, Color from, Color to, float time){ + return pushNewTween( gameObject, new Vector3(1.0f,to.a,0.0f), time, options().setCallbackColor().setPoint( new Vector3(to.r, to.g, to.b) ) + .setAxis( new Vector3(from.r, from.g, from.b) ).setFrom( new Vector3(0.0f, from.a, 0.0f) ).setHasInitialized(false).setOnUpdateColor(callOnUpdate) ); + } + + /** + * Tween any particular value (Vector2), this could be used to tween an arbitrary value like offset property + * + * @method LeanTween.value (Vector2) + * @param {GameObject} gameObject:GameObject Gameobject that you wish to attach the tween to + * @param {Action} callOnUpdate:Action The function that is called on every Update frame, this function needs to accept a float value ex: function updateValue( Vector3 val ){ } + * @param {float} from:Vector2 The original value to start the tween from + * @param {Vector2} to:Vector2 The final Vector3 with which to tween to + * @param {float} time:float The time to complete the tween in + * @return {LTDescr} LTDescr an object that distinguishes the tween + */ + public static LTDescr value(GameObject gameObject, Action callOnUpdate, Vector2 from, Vector2 to, float time){ + return pushNewTween( gameObject, new Vector3(to.x,to.y,0f), time, options().setValue3().setTo( new Vector3(to.x,to.y,0f) ).setFrom( new Vector3(from.x,from.y,0f) ).setOnUpdateVector2(callOnUpdate) ); + } + + /** + * Tween any particular value (Vector3), this could be used to tween an arbitrary property that uses a Vector + * + * @method LeanTween.value (Vector3) + * @param {GameObject} gameObject:GameObject Gameobject that you wish to attach the tween to + * @param {Action} callOnUpdate:Action The function that is called on every Update frame, this function needs to accept a float value ex: function updateValue( Vector3 val ){ } + * @param {float} from:Vector3 The original value to start the tween from + * @param {Vector3} to:Vector3 The final Vector3 with which to tween to + * @param {float} time:float The time to complete the tween in + * @return {LTDescr} LTDescr an object that distinguishes the tween + */ + public static LTDescr value(GameObject gameObject, Action callOnUpdate, Vector3 from, Vector3 to, float time){ + return pushNewTween( gameObject, to, time, options().setValue3().setTo( to ).setFrom( from ).setOnUpdateVector3(callOnUpdate) ); + } + + /** + * Tween any particular value (float) + * + * @method LeanTween.value (float,object) + * @param {GameObject} gameObject:GameObject Gameobject that you wish to attach the tween to + * @param {Action} callOnUpdate:Action The function that is called on every Update frame, this function needs to accept a float value ex: function updateValue( Vector3 val, object obj ){ } + * @param {float} from:float The original value to start the tween from + * @param {Vector3} to:float The final Vector3 with which to tween to + * @param {float} time:float The time to complete the tween in + * @return {LTDescr} LTDescr an object that distinguishes the tween + */ + public static LTDescr value(GameObject gameObject, Action callOnUpdate, float from, float to, float time){ + return pushNewTween( gameObject, new Vector3(to,0,0), time, options().setCallback().setTo( new Vector3(to,0,0) ).setFrom( new Vector3(from,0,0) ).setOnUpdate(callOnUpdate, gameObject) ); + } + + public static LTDescr delayedSound( AudioClip audio, Vector3 pos, float volume ){ + //Debug.LogError("Delay sound??"); + return pushNewTween( tweenEmpty, pos, 0f, options().setDelayedSound().setTo( pos ).setFrom( new Vector3(volume,0,0) ).setAudio( audio ) ); + } + + public static LTDescr delayedSound( GameObject gameObject, AudioClip audio, Vector3 pos, float volume ){ + //Debug.LogError("Delay sound??"); + return pushNewTween( gameObject, pos, 0f, options().setDelayedSound().setTo( pos ).setFrom( new Vector3(volume,0,0) ).setAudio( audio ) ); + } + + #if !UNITY_3_5 && !UNITY_4_0 && !UNITY_4_0_1 && !UNITY_4_1 && !UNITY_4_2 && !UNITY_4_3 && !UNITY_4_5 + + /** + * Move a RectTransform object (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...) Move a RectTransform object (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...) + * + * @method LeanTween.move (RectTransform) + * @param {RectTransform} rectTrans:RectTransform RectTransform that you wish to attach the tween to + * @param {Vector3} to:Vector3 The final Vector3 with which to tween to + * @param {float} time:float The time to complete the tween in + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example LeanTween.move(gameObject.GetComponent<RectTransform>(), new Vector3(200f,-100f,0f), 1f).setDelay(1f); + */ + public static LTDescr move(RectTransform rectTrans, Vector3 to, float time){ + return pushNewTween( rectTrans.gameObject, to, time, options().setCanvasMove().setRect( rectTrans ) ); + } + + /** + * Move a RectTransform object affecting x-axis only (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...) Move a RectTransform object affecting x-axis only (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...) + * + * @method LeanTween.moveX (RectTransform) + * @param {RectTransform} rectTrans:RectTransform RectTransform that you wish to attach the tween to + * @param {float} to:float The final x location with which to tween to + * @param {float} time:float The time to complete the tween in + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example LeanTween.moveX(gameObject.GetComponent<RectTransform>(), 200f, 1f).setDelay(1f); + */ + public static LTDescr moveX(RectTransform rectTrans, float to, float time){ + return pushNewTween( rectTrans.gameObject, new Vector3(to,0f,0f), time, options().setCanvasMoveX().setRect( rectTrans ) ); + } + + /** + * Move a RectTransform object affecting y-axis only (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...) Move a RectTransform object affecting y-axis only (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...) + * + * @method LeanTween.moveY (RectTransform) + * @param {RectTransform} rectTrans:RectTransform RectTransform that you wish to attach the tween to + * @param {float} to:float The final y location with which to tween to + * @param {float} time:float The time to complete the tween in + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example LeanTween.moveY(gameObject.GetComponent<RectTransform>(), 200f, 1f).setDelay(1f); + */ + public static LTDescr moveY(RectTransform rectTrans, float to, float time){ + return pushNewTween( rectTrans.gameObject, new Vector3(to,0f,0f), time, options().setCanvasMoveY().setRect( rectTrans ) ); + } + + /** + * Move a RectTransform object affecting z-axis only (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...) Move a RectTransform object affecting z-axis only (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...)n + * + * @method LeanTween.moveZ (RectTransform) + * @param {RectTransform} rectTrans:RectTransform RectTransform that you wish to attach the tween to + * @param {float} to:float The final x location with which to tween to + * @param {float} time:float The time to complete the tween in + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example LeanTween.moveZ(gameObject.GetComponent<RectTransform>(), 200f, 1f).setDelay(1f); + */ + public static LTDescr moveZ(RectTransform rectTrans, float to, float time){ + return pushNewTween( rectTrans.gameObject, new Vector3(to,0f,0f), time, options().setCanvasMoveZ().setRect( rectTrans ) ); + } + + /** + * Rotate a RectTransform object (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...) Rotate a RectTransform object (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...) + * + * @method LeanTween.rotate (RectTransform) + * @param {RectTransform} rectTrans:RectTransform RectTransform that you wish to attach the tween to + * @param {float} to:float The degree with which to rotate the RectTransform + * @param {float} time:float The time to complete the tween in + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example LeanTween.rotate(gameObject.GetComponent<RectTransform>(), 90f, 1f).setDelay(1f); + */ + public static LTDescr rotate(RectTransform rectTrans, float to, float time){ + return pushNewTween( rectTrans.gameObject, new Vector3(to,0f,0f), time, options().setCanvasRotateAround().setRect( rectTrans ).setAxis(Vector3.forward) ); + } + + public static LTDescr rotate(RectTransform rectTrans, Vector3 to, float time){ + return pushNewTween( rectTrans.gameObject, to, time, options().setCanvasRotateAround().setRect( rectTrans ).setAxis(Vector3.forward) ); + } + + /** + * Rotate a RectTransform object (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...) Rotate a RectTransform object (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...) + * + * @method LeanTween.rotateAround (RectTransform) + * @param {RectTransform} rectTrans:RectTransform RectTransform that you wish to attach the tween to + * @param {Vector3} axis:Vector3 The axis in which to rotate the RectTransform (Vector3.forward is most commonly used) + * @param {float} to:float The degree with which to rotate the RectTransform + * @param {float} time:float The time to complete the tween in + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example LeanTween.rotateAround(gameObject.GetComponent<RectTransform>(), Vector3.forward, 90f, 1f).setDelay(1f); + */ + public static LTDescr rotateAround(RectTransform rectTrans, Vector3 axis, float to, float time){ + return pushNewTween( rectTrans.gameObject, new Vector3(to,0f,0f), time, options().setCanvasRotateAround().setRect( rectTrans ).setAxis(axis) ); + } + + /** + * Rotate a RectTransform object around it's local axis (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...) Rotate a RectTransform object around it's local axis (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...) + * + * @method LeanTween.rotateAroundLocal (RectTransform) + * @param {RectTransform} rectTrans:RectTransform RectTransform that you wish to attach the tween to + * @param {Vector3} axis:Vector3 The local axis in which to rotate the RectTransform (Vector3.forward is most commonly used) + * @param {float} to:float The degree with which to rotate the RectTransform + * @param {float} time:float The time to complete the tween in + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example LeanTween.rotateAroundLocal(gameObject.GetComponent<RectTransform>(), Vector3.forward, 90f, 1f).setDelay(1f); + */ + public static LTDescr rotateAroundLocal(RectTransform rectTrans, Vector3 axis, float to, float time){ + return pushNewTween( rectTrans.gameObject, new Vector3(to,0f,0f), time, options().setCanvasRotateAroundLocal().setRect( rectTrans ).setAxis(axis) ); + } + + /** + * Scale a RectTransform object (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...) Scale a RectTransform object (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...) + * + * @method LeanTween.scale (RectTransform) + * @param {RectTransform} rectTrans:RectTransform RectTransform that you wish to attach the tween to + * @param {Vector3} to:Vector3 The final Vector3 with which to tween to (localScale) + * @param {float} time:float The time to complete the tween in + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example LeanTween.scale(gameObject.GetComponent<RectTransform>(), gameObject.GetComponent<RectTransform>().localScale*2f, 1f).setDelay(1f); + */ + public static LTDescr scale(RectTransform rectTrans, Vector3 to, float time){ + return pushNewTween( rectTrans.gameObject, to, time, options().setCanvasScale().setRect( rectTrans ) ); + } + + /** + * Change the sizeDelta of a RectTransform object (used in Unity Canvas, for Buttons, Panel, Scrollbar, etc...) Change the sizeDelta of a RectTransform object (used in Unity Canvas, for Buttons, Panel, Scrollbar, etc...) + * + * @method LeanTween.size (RectTransform) + * @param {RectTransform} rectTrans:RectTransform RectTransform that you wish to attach the tween to + * @param {Vector2} to:Vector2 The final Vector2 the tween will end at for sizeDelta property + * @param {float} time:float The time to complete the tween in + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example LeanTween.size(gameObject.GetComponent<RectTransform>(), gameObject.GetComponent<RectTransform>().sizeDelta*2f, 1f).setDelay(1f); + */ + public static LTDescr size(RectTransform rectTrans, Vector2 to, float time){ + return pushNewTween( rectTrans.gameObject, to, time, options().setCanvasSizeDelta().setRect( rectTrans ) ); + } + + /** + * Alpha an Image Component attached to a RectTransform (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...) Alpha an Image Component attached to a RectTransform (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...) + * + * @method LeanTween.alpha (RectTransform) + * @param {RectTransform} rectTrans:RectTransform RectTransform that you wish to attach the tween to + * @param {float} to:float The final Vector3 with which to tween to (localScale) + * @param {float} time:float The time to complete the tween in + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example LeanTween.alpha(gameObject.GetComponent<RectTransform>(), 0.5f, 1f).setDelay(1f); + */ + public static LTDescr alpha(RectTransform rectTrans, float to, float time){ + return pushNewTween( rectTrans.gameObject, new Vector3(to,0f,0f), time, options().setCanvasAlpha().setRect( rectTrans ) ); + } + + /** + * Change the Color of an Image Component attached to a RectTransform (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...) Change the Color of an Image Component attached to a RectTransform (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...) + * + * @method LeanTween.alpha (RectTransform) + * @param {RectTransform} rectTrans:RectTransform RectTransform that you wish to attach the tween to + * @param {float} to:float The final Vector3 with which to tween to (localScale) + * @param {float} time:float The time to complete the tween in + * @return {LTDescr} LTDescr an object that distinguishes the tween + * @example LeanTween.color(gameObject.GetComponent<RectTransform>(), 0.5f, 1f).setDelay(1f); + */ + public static LTDescr color(RectTransform rectTrans, Color to, float time){ + return pushNewTween( rectTrans.gameObject, new Vector3(1.0f, to.a, 0.0f), time, options().setCanvasColor().setRect( rectTrans ).setPoint( new Vector3(to.r, to.g, to.b) ) ); + } + + #endif + + // Tweening Functions - Thanks to Robert Penner and GFX47 + + public static float tweenOnCurve( LTDescr tweenDescr, float ratioPassed ){ + // Debug.Log("single ratio:"+ratioPassed+" tweenDescr.animationCurve.Evaluate(ratioPassed):"+tweenDescr.animationCurve.Evaluate(ratioPassed)); + return tweenDescr.from.x + (tweenDescr.diff.x) * tweenDescr.optional.animationCurve.Evaluate(ratioPassed); + } + + public static Vector3 tweenOnCurveVector( LTDescr tweenDescr, float ratioPassed ){ + return new Vector3(tweenDescr.from.x + (tweenDescr.diff.x) * tweenDescr.optional.animationCurve.Evaluate(ratioPassed), + tweenDescr.from.y + (tweenDescr.diff.y) * tweenDescr.optional.animationCurve.Evaluate(ratioPassed), + tweenDescr.from.z + (tweenDescr.diff.z) * tweenDescr.optional.animationCurve.Evaluate(ratioPassed) ); + } + + public static float easeOutQuadOpt( float start, float diff, float ratioPassed ){ + return -diff * ratioPassed * (ratioPassed - 2) + start; + } + + public static float easeInQuadOpt( float start, float diff, float ratioPassed ){ + return diff * ratioPassed * ratioPassed + start; + } + + public static float easeInOutQuadOpt( float start, float diff, float ratioPassed ){ + ratioPassed /= .5f; + if (ratioPassed < 1) return diff / 2 * ratioPassed * ratioPassed + start; + ratioPassed--; + return -diff / 2 * (ratioPassed * (ratioPassed - 2) - 1) + start; + } + + public static Vector3 easeInOutQuadOpt( Vector3 start, Vector3 diff, float ratioPassed ){ + ratioPassed /= .5f; + if (ratioPassed < 1) return diff / 2 * ratioPassed * ratioPassed + start; + ratioPassed--; + return -diff / 2 * (ratioPassed * (ratioPassed - 2) - 1) + start; + } + + public static float linear(float start, float end, float val){ + return Mathf.Lerp(start, end, val); + } + + public static float clerp(float start, float end, float val){ + float min = 0.0f; + float max = 360.0f; + float half = Mathf.Abs((max - min) / 2.0f); + float retval = 0.0f; + float diff = 0.0f; + if ((end - start) < -half){ + diff = ((max - start) + end) * val; + retval = start + diff; + }else if ((end - start) > half){ + diff = -((max - end) + start) * val; + retval = start + diff; + }else retval = start + (end - start) * val; + return retval; + } + + public static float spring(float start, float end, float val ){ + val = Mathf.Clamp01(val); + val = (Mathf.Sin(val * Mathf.PI * (0.2f + 2.5f * val * val * val)) * Mathf.Pow(1f - val, 2.2f ) + val) * (1f + (1.2f * (1f - val) )); + return start + (end - start) * val; + } + + public static float easeInQuad(float start, float end, float val){ + end -= start; + return end * val * val + start; + } + + public static float easeOutQuad(float start, float end, float val){ + end -= start; + return -end * val * (val - 2) + start; + } + + public static float easeInOutQuad(float start, float end, float val){ + val /= .5f; + end -= start; + if (val < 1) return end / 2 * val * val + start; + val--; + return -end / 2 * (val * (val - 2) - 1) + start; + } + + + public static float easeInOutQuadOpt2(float start, float diffBy2, float val, float val2){ + val /= .5f; + if (val < 1) return diffBy2 * val2 + start; + val--; + return -diffBy2 * ((val2 - 2) - 1f) + start; + } + + public static float easeInCubic(float start, float end, float val){ + end -= start; + return end * val * val * val + start; + } + + public static float easeOutCubic(float start, float end, float val){ + val--; + end -= start; + return end * (val * val * val + 1) + start; + } + + public static float easeInOutCubic(float start, float end, float val){ + val /= .5f; + end -= start; + if (val < 1) return end / 2 * val * val * val + start; + val -= 2; + return end / 2 * (val * val * val + 2) + start; + } + + public static float easeInQuart(float start, float end, float val){ + end -= start; + return end * val * val * val * val + start; + } + + public static float easeOutQuart(float start, float end, float val){ + val--; + end -= start; + return -end * (val * val * val * val - 1) + start; + } + + public static float easeInOutQuart(float start, float end, float val){ + val /= .5f; + end -= start; + if (val < 1) return end / 2 * val * val * val * val + start; + val -= 2; + return -end / 2 * (val * val * val * val - 2) + start; + } + + public static float easeInQuint(float start, float end, float val){ + end -= start; + return end * val * val * val * val * val + start; + } + + public static float easeOutQuint(float start, float end, float val){ + val--; + end -= start; + return end * (val * val * val * val * val + 1) + start; + } + + public static float easeInOutQuint(float start, float end, float val){ + val /= .5f; + end -= start; + if (val < 1) return end / 2 * val * val * val * val * val + start; + val -= 2; + return end / 2 * (val * val * val * val * val + 2) + start; + } + + public static float easeInSine(float start, float end, float val){ + end -= start; + return -end * Mathf.Cos(val / 1 * (Mathf.PI / 2)) + end + start; + } + + public static float easeOutSine(float start, float end, float val){ + end -= start; + return end * Mathf.Sin(val / 1 * (Mathf.PI / 2)) + start; + } + + public static float easeInOutSine(float start, float end, float val){ + end -= start; + return -end / 2 * (Mathf.Cos(Mathf.PI * val / 1) - 1) + start; + } + + public static float easeInExpo(float start, float end, float val){ + end -= start; + return end * Mathf.Pow(2, 10 * (val / 1 - 1)) + start; + } + + public static float easeOutExpo(float start, float end, float val){ + end -= start; + return end * (-Mathf.Pow(2, -10 * val / 1) + 1) + start; + } + + public static float easeInOutExpo(float start, float end, float val){ + val /= .5f; + end -= start; + if (val < 1) return end / 2 * Mathf.Pow(2, 10 * (val - 1)) + start; + val--; + return end / 2 * (-Mathf.Pow(2, -10 * val) + 2) + start; + } + + public static float easeInCirc(float start, float end, float val){ + end -= start; + return -end * (Mathf.Sqrt(1 - val * val) - 1) + start; + } + + public static float easeOutCirc(float start, float end, float val){ + val--; + end -= start; + return end * Mathf.Sqrt(1 - val * val) + start; + } + + public static float easeInOutCirc(float start, float end, float val){ + val /= .5f; + end -= start; + if (val < 1) return -end / 2 * (Mathf.Sqrt(1 - val * val) - 1) + start; + val -= 2; + return end / 2 * (Mathf.Sqrt(1 - val * val) + 1) + start; + } + + public static float easeInBounce(float start, float end, float val){ + end -= start; + float d = 1f; + return end - easeOutBounce(0, end, d-val) + start; + } + + public static float easeOutBounce(float start, float end, float val){ + val /= 1f; + end -= start; + if (val < (1 / 2.75f)){ + return end * (7.5625f * val * val) + start; + }else if (val < (2 / 2.75f)){ + val -= (1.5f / 2.75f); + return end * (7.5625f * (val) * val + .75f) + start; + }else if (val < (2.5 / 2.75)){ + val -= (2.25f / 2.75f); + return end * (7.5625f * (val) * val + .9375f) + start; + }else{ + val -= (2.625f / 2.75f); + return end * (7.5625f * (val) * val + .984375f) + start; + } + } + + public static float easeInOutBounce(float start, float end, float val){ + end -= start; + float d= 1f; + if (val < d/2) return easeInBounce(0, end, val*2) * 0.5f + start; + else return easeOutBounce(0, end, val*2-d) * 0.5f + end*0.5f + start; + } + + public static float easeInBack(float start, float end, float val, float overshoot = 1.0f){ + end -= start; + val /= 1; + float s= 1.70158f * overshoot; + return end * (val) * val * ((s + 1) * val - s) + start; + } + + public static float easeOutBack(float start, float end, float val, float overshoot = 1.0f){ + float s = 1.70158f * overshoot; + end -= start; + val = (val / 1) - 1; + return end * ((val) * val * ((s + 1) * val + s) + 1) + start; + } + + public static float easeInOutBack(float start, float end, float val, float overshoot = 1.0f){ + float s = 1.70158f * overshoot; + end -= start; + val /= .5f; + if ((val) < 1){ + s *= (1.525f) * overshoot; + return end / 2 * (val * val * (((s) + 1) * val - s)) + start; + } + val -= 2; + s *= (1.525f) * overshoot; + return end / 2 * ((val) * val * (((s) + 1) * val + s) + 2) + start; + } + + public static float easeInElastic(float start, float end, float val, float overshoot = 1.0f, float period = 0.3f){ + end -= start; + + float p = period; + float s = 0f; + float a = 0f; + + if (val == 0f) return start; + + if (val == 1f) return start + end; + + if (a == 0f || a < Mathf.Abs(end)){ + a = end; + s = p / 4f; + }else{ + s = p / (2f * Mathf.PI) * Mathf.Asin(end / a); + } + + if(overshoot>1f && val>0.6f ) + overshoot = 1f + ((1f-val) / 0.4f * (overshoot-1f)); + // Debug.Log("ease in elastic val:"+val+" a:"+a+" overshoot:"+overshoot); + + val = val-1f; + return start-(a * Mathf.Pow(2f, 10f * val) * Mathf.Sin((val - s) * (2f * Mathf.PI) / p)) * overshoot; + } + + public static float easeOutElastic(float start, float end, float val, float overshoot = 1.0f, float period = 0.3f){ + end -= start; + + float p = period; + float s = 0f; + float a = 0f; + + if (val == 0f) return start; + + // Debug.Log("ease out elastic val:"+val+" a:"+a); + if (val == 1f) return start + end; + + if (a == 0f || a < Mathf.Abs(end)){ + a = end; + s = p / 4f; + }else{ + s = p / (2f * Mathf.PI) * Mathf.Asin(end / a); + } + if(overshoot>1f && val<0.4f ) + overshoot = 1f + (val / 0.4f * (overshoot-1f)); + // Debug.Log("ease out elastic val:"+val+" a:"+a+" overshoot:"+overshoot); + + return start + end + a * Mathf.Pow(2f, -10f * val) * Mathf.Sin((val - s) * (2f * Mathf.PI) / p) * overshoot; + } + + public static float easeInOutElastic(float start, float end, float val, float overshoot = 1.0f, float period = 0.3f) + { + end -= start; + + float p = period; + float s = 0f; + float a = 0f; + + if (val == 0f) return start; + + val = val / (1f/2f); + if (val == 2f) return start + end; + + if (a == 0f || a < Mathf.Abs(end)){ + a = end; + s = p / 4f; + }else{ + s = p / (2f * Mathf.PI) * Mathf.Asin(end / a); + } + + if(overshoot>1f){ + if( val<0.2f ){ + overshoot = 1f + (val / 0.2f * (overshoot-1f)); + }else if( val > 0.8f ){ + overshoot = 1f + ((1f-val) / 0.2f * (overshoot-1f)); + } + } + + if (val < 1f){ + val = val-1f; + return start - 0.5f * (a * Mathf.Pow(2f, 10f * val) * Mathf.Sin((val - s) * (2f * Mathf.PI) / p)) * overshoot; + } + val = val-1f; + return end + start + a * Mathf.Pow(2f, -10f * val) * Mathf.Sin((val - s) * (2f * Mathf.PI) / p) * 0.5f * overshoot; + } + + // LeanTween Listening/Dispatch + + private static System.Action[] eventListeners; + private static GameObject[] goListeners; + private static int eventsMaxSearch = 0; + public static int EVENTS_MAX = 10; + public static int LISTENERS_MAX = 10; + private static int INIT_LISTENERS_MAX = LISTENERS_MAX; + + public static void addListener( int eventId, System.Action callback ){ + addListener(tweenEmpty, eventId, callback); + } + + /** + * Add a listener method to be called when the appropriate LeanTween.dispatchEvent is called + * + * @method LeanTween.addListener + * @param {GameObject} caller:GameObject the gameObject the listener is attached to + * @param {int} eventId:int a unique int that describes the event (best to use an enum) + * @param {System.Action} callback:System.Action the method to call when the event has been dispatched + * @example + * LeanTween.addListener(gameObject, (int)MyEvents.JUMP, jumpUp);
    + *
    + * void jumpUp( LTEvent e ){ Debug.Log("jump!"); }
    + */ + public static void addListener( GameObject caller, int eventId, System.Action callback ){ + if(eventListeners==null){ + INIT_LISTENERS_MAX = LISTENERS_MAX; + eventListeners = new System.Action[ EVENTS_MAX * LISTENERS_MAX ]; + goListeners = new GameObject[ EVENTS_MAX * LISTENERS_MAX ]; + } + // Debug.Log("searching for an empty space for:"+caller + " eventid:"+event); + for(i = 0; i < INIT_LISTENERS_MAX; i++){ + int point = eventId*INIT_LISTENERS_MAX + i; + if(goListeners[ point ]==null || eventListeners[ point ]==null){ + eventListeners[ point ] = callback; + goListeners[ point ] = caller; + if(i>=eventsMaxSearch) + eventsMaxSearch = i+1; + // Debug.Log("adding event for:"+caller.name); + + return; + } + #if UNITY_FLASH + if(goListeners[ point ] == caller && System.Object.ReferenceEquals( eventListeners[ point ], callback)){ + // Debug.Log("This event is already being listened for."); + return; + } + #else + if(goListeners[ point ] == caller && System.Object.Equals( eventListeners[ point ], callback)){ + // Debug.Log("This event is already being listened for."); + return; + } + #endif + } + Debug.LogError("You ran out of areas to add listeners, consider increasing LISTENERS_MAX, ex: LeanTween.LISTENERS_MAX = "+(LISTENERS_MAX*2)); + } + + public static bool removeListener( int eventId, System.Action callback ){ + return removeListener( tweenEmpty, eventId, callback); + } + + public static bool removeListener( int eventId ){ + int point = eventId*INIT_LISTENERS_MAX + i; + eventListeners[ point ] = null; + goListeners[ point ] = null; + return true; + } + + + /** + * Remove an event listener you have added + * @method LeanTween.removeListener + * @param {GameObject} caller:GameObject the gameObject the listener is attached to + * @param {int} eventId:int a unique int that describes the event (best to use an enum) + * @param {System.Action} callback:System.Action the method that was specified to call when the event has been dispatched + * @example + * LeanTween.removeListener(gameObject, (int)MyEvents.JUMP, jumpUp);
    + *
    + * void jumpUp( LTEvent e ){ }
    + */ + public static bool removeListener( GameObject caller, int eventId, System.Action callback ){ + for(i = 0; i < eventsMaxSearch; i++){ + int point = eventId*INIT_LISTENERS_MAX + i; + #if UNITY_FLASH + if(goListeners[ point ] == caller && System.Object.ReferenceEquals( eventListeners[ point ], callback) ){ + #else + if(goListeners[ point ] == caller && System.Object.Equals( eventListeners[ point ], callback) ){ + #endif + eventListeners[ point ] = null; + goListeners[ point ] = null; + return true; + } + } + return false; + } + + /** + * Tell the added listeners that you are dispatching the event + * @method LeanTween.dispatchEvent + * @param {int} eventId:int a unique int that describes the event (best to use an enum) + * @example + * LeanTween.dispatchEvent( (int)MyEvents.JUMP );
    + */ + public static void dispatchEvent( int eventId ){ + dispatchEvent( eventId, null); + } + + /** + * Tell the added listeners that you are dispatching the event + * @method LeanTween.dispatchEvent + * @param {int} eventId:int a unique int that describes the event (best to use an enum) + * @param {object} data:object Pass data to the listener, access it from the listener with *.data on the LTEvent object + * @example + * LeanTween.dispatchEvent( (int)MyEvents.JUMP, transform );
    + *
    + * void jumpUp( LTEvent e ){
    + *   Transform tran = (Transform)e.data;
    + * }
    + */ + public static void dispatchEvent( int eventId, object data ){ + for(int k = 0; k < eventsMaxSearch; k++){ + int point = eventId*INIT_LISTENERS_MAX + k; + if(eventListeners[ point ]!=null){ + if(goListeners[point]){ + eventListeners[ point ]( new LTEvent(eventId, data) ); + }else{ + eventListeners[ point ] = null; + } + } + } + } + + +} // End LeanTween class + +public class LTUtility { + + public static Vector3[] reverse( Vector3[] arr ){ + int length = arr.Length; + int left = 0; + int right = length - 1; + + for (; left < right; left += 1, right -= 1){ + Vector3 temporary = arr[left]; + arr[left] = arr[right]; + arr[right] = temporary; + } + return arr; + } +} + +public class LTBezier { + public float length; + + private Vector3 a; + private Vector3 aa; + private Vector3 bb; + private Vector3 cc; + private float len; + private float[] arcLengths; + + public LTBezier(Vector3 a, Vector3 b, Vector3 c, Vector3 d, float precision){ + this.a = a; + aa = (-a + 3*(b-c) + d); + bb = 3*(a+c) - 6*b; + cc = 3*(b-a); + + this.len = 1.0f / precision; + arcLengths = new float[(int)this.len + (int)1]; + arcLengths[0] = 0; + + Vector3 ov = a; + Vector3 v; + float clen = 0.0f; + for(int i = 1; i <= this.len; i++) { + v = bezierPoint(i * precision); + clen += (ov - v).magnitude; + this.arcLengths[i] = clen; + ov = v; + } + this.length = clen; + } + + private float map(float u) { + float targetLength = u * this.arcLengths[(int)this.len]; + int low = 0; + int high = (int)this.len; + int index = 0; + while (low < high) { + index = low + ((int)((high - low) / 2.0f) | 0); + if (this.arcLengths[index] < targetLength) { + low = index + 1; + } else { + high = index; + } + } + if(this.arcLengths[index] > targetLength) + index--; + if(index<0) + index = 0; + + return (index + (targetLength - arcLengths[index]) / (arcLengths[index + 1] - arcLengths[index])) / this.len; + } + + private Vector3 bezierPoint(float t){ + return ((aa* t + (bb))* t + cc)* t + a; + } + + public Vector3 point(float t){ + return bezierPoint( map(t) ); + } +} + +/** +* Manually animate along a bezier path with this class +* @class LTBezierPath +* @constructor +* @param {Vector3 Array} pts A set of points that define one or many bezier paths (the paths should be passed in multiples of 4, which correspond to each individual bezier curve)
    +* It goes in the order: startPoint,endControl,startControl,endPoint - Note: the control for the end and start are reversed! This is just a *quirk* of the API.
    +* +* @example +* LTBezierPath ltPath = new LTBezierPath( new Vector3[] { new Vector3(0f,0f,0f),new Vector3(1f,0f,0f), new Vector3(1f,0f,0f), new Vector3(1f,1f,0f)} );

    +* LeanTween.move(lt, ltPath.vec3, 4.0f).setOrientToPath(true).setDelay(1f).setEase(LeanTweenType.easeInOutQuad); // animate
    +* Vector3 pt = ltPath.point( 0.6f ); // retrieve a point along the path +*/ +public class LTBezierPath { + public Vector3[] pts; + public float length; + public bool orientToPath; + public bool orientToPath2d; + + private LTBezier[] beziers; + private float[] lengthRatio; + private int currentBezier=0,previousBezier=0; + + public LTBezierPath(){ } + public LTBezierPath( Vector3[] pts_ ){ + setPoints( pts_ ); + } + + public void setPoints( Vector3[] pts_ ){ + if(pts_.Length<4) + LeanTween.logError( "LeanTween - When passing values for a vector path, you must pass four or more values!" ); + if(pts_.Length%4!=0) + LeanTween.logError( "LeanTween - When passing values for a vector path, they must be in sets of four: controlPoint1, controlPoint2, endPoint2, controlPoint2, controlPoint2..." ); + + pts = pts_; + + int k = 0; + beziers = new LTBezier[ pts.Length / 4 ]; + lengthRatio = new float[ beziers.Length ]; + int i; + length = 0; + for(i = 0; i < pts.Length; i+=4){ + beziers[k] = new LTBezier(pts[i+0],pts[i+2],pts[i+1],pts[i+3],0.05f); + length += beziers[k].length; + k++; + } + // Debug.Log("beziers.Length:"+beziers.Length + " beziers:"+beziers); + for(i = 0; i < beziers.Length; i++){ + lengthRatio[i] = beziers[i].length / length; + } + } + + /** + * @property {float} distance distance of the path (in unity units) + */ + public float distance{ + get{ + return length; + } + } + + /** + * Retrieve a point along a path Move a GameObject to a certain location + * + * @method point + * @param {float} ratio:float ratio of the point along the path you wish to receive (0-1) + * @return {Vector3} Vector3 position of the point along the path + * @example + * transform.position = ltPath.point( 0.6f ); + */ + public Vector3 point( float ratio ){ + float added = 0.0f; + for(int i = 0; i < lengthRatio.Length; i++){ + added += lengthRatio[i]; + if(added >= ratio) + return beziers[i].point( (ratio-(added-lengthRatio[i])) / lengthRatio[i] ); + } + return beziers[lengthRatio.Length-1].point( 1.0f ); + } + + public void place2d( Transform transform, float ratio ){ + transform.position = point( ratio ); + ratio += 0.001f; + if(ratio<=1.0f){ + Vector3 v3Dir = point( ratio ) - transform.position; + float angle = Mathf.Atan2(v3Dir.y, v3Dir.x) * Mathf.Rad2Deg; + transform.eulerAngles = new Vector3(0, 0, angle); + } + } + + public void placeLocal2d( Transform transform, float ratio ){ + transform.localPosition = point( ratio ); + ratio += 0.001f; + if(ratio<=1.0f){ + Vector3 v3Dir = point( ratio ) - transform.localPosition; + float angle = Mathf.Atan2(v3Dir.y, v3Dir.x) * Mathf.Rad2Deg; + transform.localEulerAngles = new Vector3(0, 0, angle); + } + } + + /** + * Place an object along a certain point on the path (facing the direction perpendicular to the path) Move a GameObject to a certain location + * + * @method place + * @param {Transform} transform:Transform the transform of the object you wish to place along the path + * @param {float} ratio:float ratio of the point along the path you wish to receive (0-1) + * @example + * ltPath.place( transform, 0.6f ); + */ + public void place( Transform transform, float ratio ){ + place( transform, ratio, Vector3.up ); + + } + + /** + * Place an object along a certain point on the path, with it facing a certain direction perpendicular to the path Move a GameObject to a certain location + * + * @method place + * @param {Transform} transform:Transform the transform of the object you wish to place along the path + * @param {float} ratio:float ratio of the point along the path you wish to receive (0-1) + * @param {Vector3} rotation:Vector3 the direction in which to place the transform ex: Vector3.up + * @example + * ltPath.place( transform, 0.6f, Vector3.left ); + */ + public void place( Transform transform, float ratio, Vector3 worldUp ){ + transform.position = point( ratio ); + ratio += 0.001f; + if(ratio<=1.0f) + transform.LookAt( point( ratio ), worldUp ); + + } + + /** + * Place an object along a certain point on the path (facing the direction perpendicular to the path) - Local Space, not world-space Move a GameObject to a certain location + * + * @method placeLocal + * @param {Transform} transform:Transform the transform of the object you wish to place along the path + * @param {float} ratio:float ratio of the point along the path you wish to receive (0-1) + * @example + * ltPath.placeLocal( transform, 0.6f ); + */ + public void placeLocal( Transform transform, float ratio ){ + placeLocal( transform, ratio, Vector3.up ); + } + + /** + * Place an object along a certain point on the path, with it facing a certain direction perpendicular to the path - Local Space, not world-space Move a GameObject to a certain location + * + * @method placeLocal + * @param {Transform} transform:Transform the transform of the object you wish to place along the path + * @param {float} ratio:float ratio of the point along the path you wish to receive (0-1) + * @param {Vector3} rotation:Vector3 the direction in which to place the transform ex: Vector3.up + * @example + * ltPath.placeLocal( transform, 0.6f, Vector3.left ); + */ + public void placeLocal( Transform transform, float ratio, Vector3 worldUp ){ + // Debug.Log("place ratio:" + ratio + " greater:"+(ratio>1f)); + ratio = Mathf.Clamp01(ratio); + transform.localPosition = point( ratio ); + // Debug.Log("ratio:" + ratio + " +:" + (ratio + 0.001f)); + ratio = Mathf.Clamp01(ratio + 0.001f); + + if(ratio<=1.0f) + transform.LookAt( transform.parent.TransformPoint( point( ratio ) ), worldUp ); + } + + public void gizmoDraw(float t = -1.0f) + { + Vector3 prevPt = point(0); + + for (int i = 1; i <= 120; i++) + { + float pm = (float)i / 120f; + Vector3 currPt2 = point(pm); + //Gizmos.color = new Color(UnityEngine.Random.Range(0f,1f),UnityEngine.Random.Range(0f,1f),UnityEngine.Random.Range(0f,1f),1); + Gizmos.color = (previousBezier == currentBezier) ? Color.magenta : Color.grey; + Gizmos.DrawLine(currPt2, prevPt); + prevPt = currPt2; + previousBezier = currentBezier; + } + } +} + +/** +* Animate along a set of points that need to be in the format: controlPoint, point1, point2.... pointLast, endControlPoint Move a GameObject to a certain location +* @class LTSpline +* @constructor +* @param {Vector3 Array} pts A set of points that define the points the path will pass through (starting with starting control point, and ending with a control point)
    +Note: The first and last item just define the angle of the end points, they are not actually used in the spline path itself. If you do not care about the angle you can jus set the first two items and last two items as the same value. +* @example +* LTSpline ltSpline = new LTSpline( new Vector3[] { new Vector3(0f,0f,0f),new Vector3(0f,0f,0f), new Vector3(0f,0.5f,0f), new Vector3(1f,1f,0f), new Vector3(1f,1f,0f)} );

    +* LeanTween.moveSpline(lt, ltSpline.vec3, 4.0f).setOrientToPath(true).setDelay(1f).setEase(LeanTweenType.easeInOutQuad); // animate
    +* Vector3 pt = ltSpline.point( 0.6f ); // retrieve a point along the path +*/ +[System.Serializable] +public class LTSpline { + public static int DISTANCE_COUNT = 3; // increase for a more accurate constant speed + public static int SUBLINE_COUNT = 20; // increase for a more accurate smoothing of the curves into lines + + /** + * @property {float} distance distance of the spline (in unity units) + */ + public float distance = 0f; + + public bool constantSpeed = true; + + public Vector3[] pts; + [System.NonSerialized] + public Vector3[] ptsAdj; + public int ptsAdjLength; + public bool orientToPath; + public bool orientToPath2d; + private int numSections; + private int currPt; + + public LTSpline( Vector3[] pts ){ + init( pts, true); + } + + public LTSpline( Vector3[] pts, bool constantSpeed ) { + this.constantSpeed = constantSpeed; + init(pts, constantSpeed); + } + + private void init( Vector3[] pts, bool constantSpeed){ + if(pts.Length<4){ + LeanTween.logError( "LeanTween - When passing values for a spline path, you must pass four or more values!" ); + return; + } + + this.pts = new Vector3[pts.Length]; + System.Array.Copy(pts, this.pts, pts.Length); + + numSections = pts.Length - 3; + + float minSegment = float.PositiveInfinity; + Vector3 earlierPoint = this.pts[1]; + float totalDistance = 0f; + for(int i=1; i < this.pts.Length-1; i++){ + // float pointDistance = (this.pts[i]-earlierPoint).sqrMagnitude; + float pointDistance = Vector3.Distance(this.pts[i], earlierPoint); + //Debug.Log("pointDist:"+pointDistance); + if(pointDistance < minSegment){ + minSegment = pointDistance; + } + + totalDistance += pointDistance; + } + + if(constantSpeed){ + minSegment = totalDistance / (numSections*SUBLINE_COUNT); + //Debug.Log("minSegment:"+minSegment+" numSections:"+numSections); + + float minPrecision = minSegment / SUBLINE_COUNT; // number of subdivisions in each segment + int precision = (int)Mathf.Ceil(totalDistance / minPrecision) * DISTANCE_COUNT; + // Debug.Log("precision:"+precision); + if(precision<=1) // precision has to be greater than one + precision = 2; + + ptsAdj = new Vector3[ precision ]; + earlierPoint = interp( 0f ); + int num = 1; + ptsAdj[0] = earlierPoint; + distance = 0f; + for(int i = 0; i < precision + 1; i++){ + float fract = ((float)(i)) / precision; + // Debug.Log("fract:"+fract); + Vector3 point = interp( fract ); + float dist = Vector3.Distance(point, earlierPoint); + + // float dist = (point-earlierPoint).sqrMagnitude; + if(dist>=minPrecision || fract>=1.0f){ + ptsAdj[num] = point; + distance += dist; // only add it to the total distance once we know we are adding it as an adjusted point + + earlierPoint = point; + // Debug.Log("fract:"+fract+" point:"+point); + num++; + } + } + // make sure there is a point at the very end + /*num++; + Vector3 endPoint = interp( 1f ); + ptsAdj[num] = endPoint;*/ + // Debug.Log("fract 1f endPoint:"+endPoint); + + ptsAdjLength = num; + } + // Debug.Log("map 1f:"+map(1f)+" end:"+ptsAdj[ ptsAdjLength-1 ]); + + // Debug.Log("ptsAdjLength:"+ptsAdjLength+" minPrecision:"+minPrecision+" precision:"+precision); + } + + public Vector3 map( float u ){ + if(u>=1f) + return pts[ pts.Length - 2]; + float t = u * (ptsAdjLength-1); + int first = (int)Mathf.Floor( t ); + int next = (int)Mathf.Ceil( t ); + + if(first<0) + first = 0; + + Vector3 val = ptsAdj[ first ]; + + + Vector3 nextVal = ptsAdj[ next ]; + float diff = t - first; + + // Debug.Log("u:"+u+" val:"+val +" nextVal:"+nextVal+" diff:"+diff+" first:"+first+" next:"+next); + + val = val + (nextVal - val) * diff; + + return val; + } + + public Vector3 interp(float t) { + currPt = Mathf.Min(Mathf.FloorToInt(t * (float) numSections), numSections - 1); + float u = t * (float) numSections - (float) currPt; + + //Debug.Log("currPt:"+currPt+" numSections:"+numSections+" pts.Length :"+pts.Length ); + Vector3 a = pts[currPt]; + Vector3 b = pts[currPt + 1]; + Vector3 c = pts[currPt + 2]; + Vector3 d = pts[currPt + 3]; + + Vector3 val = (.5f * ( + (-a + 3f * b - 3f * c + d) * (u * u * u) + + (2f * a - 5f * b + 4f * c - d) * (u * u) + + (-a + c) * u + + 2f * b)); + // Debug.Log("currPt:"+currPt+" t:"+t+" val.x"+val.x+" y:"+val.y+" z:"+val.z); + + return val; + } + + /** + * Retrieve a point along a path Move a GameObject to a certain location + * + * @method ratioAtPoint + * @param {Vector3} point:Vector3 given a current location it makes the best approximiation of where it is along the path ratio-wise (0-1) + * @return {float} float of ratio along the path + * @example + * ratioIter = ltSpline.ratioAtPoint( transform.position ); + */ + public float ratioAtPoint( Vector3 pt ){ + float closestDist = float.MaxValue; + int closestI = 0; + for (int i = 0; i < ptsAdjLength; i++) { + float dist = Vector3.Distance(pt, ptsAdj[i]); + // Debug.Log("i:"+i+" dist:"+dist); + if(distMove a GameObject to a certain location + * + * @method point + * @param {float} ratio:float ratio of the point along the path you wish to receive (0-1) + * @return {Vector3} Vector3 position of the point along the path + * @example + * transform.position = ltSpline.point( 0.6f ); + */ + public Vector3 point( float ratio ){ + float t = ratio>1f?1f:ratio; + return constantSpeed ? map(t) : interp(t); + } + + public void place2d( Transform transform, float ratio ){ + transform.position = point( ratio ); + ratio += 0.001f; + if(ratio<=1.0f){ + Vector3 v3Dir = point( ratio ) - transform.position; + float angle = Mathf.Atan2(v3Dir.y, v3Dir.x) * Mathf.Rad2Deg; + transform.eulerAngles = new Vector3(0, 0, angle); + } + } + + public void placeLocal2d( Transform transform, float ratio ){ + Transform trans = transform.parent; + if(trans==null){ // this has no parent, just do a regular transform + place2d(transform, ratio); + return; + } + transform.localPosition = point( ratio ); + ratio += 0.001f; + if(ratio<=1.0f){ + Vector3 ptAhead = point( ratio );//trans.TransformPoint( ); + Vector3 v3Dir = ptAhead - transform.localPosition; + float angle = Mathf.Atan2(v3Dir.y, v3Dir.x) * Mathf.Rad2Deg; + transform.localEulerAngles = new Vector3(0, 0, angle); + } + } + + + /** + * Place an object along a certain point on the path (facing the direction perpendicular to the path) Move a GameObject to a certain location + * + * @method place + * @param {Transform} transform:Transform the transform of the object you wish to place along the path + * @param {float} ratio:float ratio of the point along the path you wish to receive (0-1) + * @example + * ltPath.place( transform, 0.6f ); + */ + public void place( Transform transform, float ratio ){ + place(transform, ratio, Vector3.up); + } + + /** + * Place an object along a certain point on the path, with it facing a certain direction perpendicular to the path Move a GameObject to a certain location + * + * @method place + * @param {Transform} transform:Transform the transform of the object you wish to place along the path + * @param {float} ratio:float ratio of the point along the path you wish to receive (0-1) + * @param {Vector3} rotation:Vector3 the direction in which to place the transform ex: Vector3.up + * @example + * ltPath.place( transform, 0.6f, Vector3.left ); + */ + public void place( Transform transform, float ratio, Vector3 worldUp ){ + // ratio = Mathf.Repeat(ratio, 1.0f); // make sure ratio is always between 0-1 + transform.position = point( ratio ); + ratio += 0.001f; + if(ratio<=1.0f) + transform.LookAt( point( ratio ), worldUp ); + + } + + /** + * Place an object along a certain point on the path (facing the direction perpendicular to the path) - Local Space, not world-space Move a GameObject to a certain location + * + * @method placeLocal + * @param {Transform} transform:Transform the transform of the object you wish to place along the path + * @param {float} ratio:float ratio of the point along the path you wish to receive (0-1) + * @example + * ltPath.placeLocal( transform, 0.6f ); + */ + public void placeLocal( Transform transform, float ratio ){ + placeLocal( transform, ratio, Vector3.up ); + } + + /** + * Place an object along a certain point on the path, with it facing a certain direction perpendicular to the path - Local Space, not world-space Move a GameObject to a certain location + * + * @method placeLocal + * @param {Transform} transform:Transform the transform of the object you wish to place along the path + * @param {float} ratio:float ratio of the point along the path you wish to receive (0-1) + * @param {Vector3} rotation:Vector3 the direction in which to place the transform ex: Vector3.up + * @example + * ltPath.placeLocal( transform, 0.6f, Vector3.left ); + */ + public void placeLocal( Transform transform, float ratio, Vector3 worldUp ){ + transform.localPosition = point( ratio ); + ratio += 0.001f; + if(ratio<=1.0f) + transform.LookAt( transform.parent.TransformPoint( point( ratio ) ), worldUp ); + } + + public void gizmoDraw(float t = -1.0f) { + if(ptsAdj==null || ptsAdj.Length<=0) + return; + + Vector3 prevPt = ptsAdj[0]; + + for (int i = 0; i < ptsAdjLength; i++) { + Vector3 currPt2 = ptsAdj[i]; + // Debug.Log("currPt2:"+currPt2); + //Gizmos.color = new Color(UnityEngine.Random.Range(0f,1f),UnityEngine.Random.Range(0f,1f),UnityEngine.Random.Range(0f,1f),1); + Gizmos.DrawLine(prevPt, currPt2); + prevPt = currPt2; + } + } + + public void drawGizmo( Color color ) { + if( this.ptsAdjLength>=4){ + + Vector3 prevPt = this.ptsAdj[0]; + + Color colorBefore = Gizmos.color; + Gizmos.color = color; + for (int i = 0; i < this.ptsAdjLength; i++) { + Vector3 currPt2 = this.ptsAdj[i]; + // Debug.Log("currPt2:"+currPt2); + + Gizmos.DrawLine(prevPt, currPt2); + prevPt = currPt2; + } + Gizmos.color = colorBefore; + } + } + + public static void drawGizmo(Transform[] arr, Color color) { + if(arr.Length>=4){ + Vector3[] vec3s = new Vector3[arr.Length]; + for(int i = 0; i < arr.Length; i++){ + vec3s[i] = arr[i].position; + } + LTSpline spline = new LTSpline(vec3s); + Vector3 prevPt = spline.ptsAdj[0]; + + Color colorBefore = Gizmos.color; + Gizmos.color = color; + for (int i = 0; i < spline.ptsAdjLength; i++) { + Vector3 currPt2 = spline.ptsAdj[i]; + // Debug.Log("currPt2:"+currPt2); + + Gizmos.DrawLine(prevPt, currPt2); + prevPt = currPt2; + } + Gizmos.color = colorBefore; + } + } + + + public static void drawLine(Transform[] arr, float width, Color color) { + if(arr.Length>=4){ + + } + } + + /*public Vector3 Velocity(float t) { + t = map( t ); + + int numSections = pts.Length - 3; + int currPt = Mathf.Min(Mathf.FloorToInt(t * (float) numSections), numSections - 1); + float u = t * (float) numSections - (float) currPt; + + Vector3 a = pts[currPt]; + Vector3 b = pts[currPt + 1]; + Vector3 c = pts[currPt + 2]; + Vector3 d = pts[currPt + 3]; + + return 1.5f * (-a + 3f * b - 3f * c + d) * (u * u) + + (2f * a -5f * b + 4f * c - d) * u + + .5f * c - .5f * a; + }*/ + + public void drawLinesGLLines(Material outlineMaterial, Color color, float width){ + GL.PushMatrix(); + outlineMaterial.SetPass(0); + GL.LoadPixelMatrix(); + GL.Begin(GL.LINES); + GL.Color(color); + + if (constantSpeed) { + if (this.ptsAdjLength >= 4) { + + Vector3 prevPt = this.ptsAdj[0]; + + for (int i = 0; i < this.ptsAdjLength; i++) { + Vector3 currPt2 = this.ptsAdj[i]; + GL.Vertex(prevPt); + GL.Vertex(currPt2); + + prevPt = currPt2; + } + } + + } else { + if (this.pts.Length >= 4) { + + Vector3 prevPt = this.pts[0]; + + float split = 1f / ((float)this.pts.Length * 10f); + + float iter = 0f; + while (iter < 1f) { + float at = iter / 1f; + Vector3 currPt2 = interp(at); + // Debug.Log("currPt2:"+currPt2); + + GL.Vertex(prevPt); + GL.Vertex(currPt2); + + prevPt = currPt2; + + iter += split; + } + } + } + + + GL.End(); + GL.PopMatrix(); + + } + + public Vector3[] generateVectors(){ + if (this.pts.Length >= 4) { + List meshPoints = new List(); + Vector3 prevPt = this.pts[0]; + meshPoints.Add(prevPt); + + float split = 1f / ((float)this.pts.Length * 10f); + + float iter = 0f; + while (iter < 1f) { + float at = iter / 1f; + Vector3 currPt2 = interp(at); + // Debug.Log("currPt2:"+currPt2); + + // GL.Vertex(prevPt); + // GL.Vertex(currPt2); + meshPoints.Add(currPt2); + + // prevPt = currPt2; + + iter += split; + } + + meshPoints.ToArray(); + } + return null; + } +} + +/** +* Animate GUI Elements by creating this object and passing the *.rect variable to the GUI method

    +* Example Javascript:
    var bRect:LTRect = new LTRect( 0, 0, 100, 50 );
    +* LeanTween.scale( bRect, Vector2(bRect.rect.width, bRect.rect.height) * 1.3, 0.25 );
    +* function OnGUI(){
    +*   if(GUI.Button(bRect.rect, "Scale")){ }
    +* }
    +*
    +* Example C#:
    +* LTRect bRect = new LTRect( 0f, 0f, 100f, 50f );
    +* LeanTween.scale( bRect, new Vector2(150f,75f), 0.25f );
    +* void OnGUI(){
    +*   if(GUI.Button(bRect.rect, "Scale")){ }
    +* }
    +* +* @class LTRect +* @constructor +* @param {float} x:float X location +* @param {float} y:float Y location +* @param {float} width:float Width +* @param {float} height:float Height +* @param {float} alpha:float (Optional) initial alpha amount (0-1) +* @param {float} rotation:float (Optional) initial rotation in degrees (0-360) +*/ + +[System.Serializable] +public class LTRect : System.Object{ + /** + * Pass this value to the GUI Methods + * + * @property rect + * @type {Rect} rect:Rect Rect object that controls the positioning and size + */ + public Rect _rect; + public float alpha = 1f; + public float rotation; + public Vector2 pivot; + public Vector2 margin; + public Rect relativeRect = new Rect(0f,0f,float.PositiveInfinity,float.PositiveInfinity); + + public bool rotateEnabled; + [HideInInspector] + public bool rotateFinished; + public bool alphaEnabled; + public string labelStr; + public LTGUI.Element_Type type; + public GUIStyle style; + public bool useColor = false; + public Color color = Color.white; + public bool fontScaleToFit; + public bool useSimpleScale; + public bool sizeByHeight; + + public Texture texture; + + private int _id = -1; + [HideInInspector] + public int counter; + + public static bool colorTouched; + + public LTRect(){ + reset(); + this.rotateEnabled = this.alphaEnabled = true; + _rect = new Rect(0f,0f,1f,1f); + } + + public LTRect(Rect rect){ + _rect = rect; + reset(); + } + + public LTRect(float x, float y, float width, float height){ + _rect = new Rect(x,y,width,height); + this.alpha = 1.0f; + this.rotation = 0.0f; + this.rotateEnabled = this.alphaEnabled = false; + } + + public LTRect(float x, float y, float width, float height, float alpha){ + _rect = new Rect(x,y,width,height); + this.alpha = alpha; + this.rotation = 0.0f; + this.rotateEnabled = this.alphaEnabled = false; + } + + public LTRect(float x, float y, float width, float height, float alpha, float rotation){ + _rect = new Rect(x,y,width,height); + this.alpha = alpha; + this.rotation = rotation; + this.rotateEnabled = this.alphaEnabled = false; + if(rotation!=0.0f){ + this.rotateEnabled = true; + resetForRotation(); + } + } + + public bool hasInitiliazed{ + get{ + return _id!=-1; + } + } + + public int id{ + get{ + int toId = _id | counter << 16; + + /*uint backId = toId & 0xFFFF; + uint backCounter = toId >> 16; + if(_id!=backId || backCounter!=counter){ + Debug.LogError("BAD CONVERSION toId:"+_id); + }*/ + + return toId; + } + } + + public void setId( int id, int counter){ + this._id = id; + this.counter = counter; + } + + public void reset(){ + this.alpha = 1.0f; + this.rotation = 0.0f; + this.rotateEnabled = this.alphaEnabled = false; + this.margin = Vector2.zero; + this.sizeByHeight = false; + this.useColor = false; + } + + public void resetForRotation(){ + Vector3 scale = new Vector3(GUI.matrix[0,0], GUI.matrix[1,1], GUI.matrix[2,2]); + if(pivot==Vector2.zero){ + pivot = new Vector2((_rect.x+((_rect.width)*0.5f )) * scale.x + GUI.matrix[0,3], (_rect.y+((_rect.height)*0.5f )) * scale.y + GUI.matrix[1,3]); + } + } + + public float x{ + get{ return _rect.x; } + set{ _rect.x = value; } + } + + public float y{ + get{ return _rect.y; } + set{ _rect.y = value; } + } + + public float width{ + get{ return _rect.width; } + set{ _rect.width = value; } + } + + public float height{ + get{ return _rect.height; } + set{ _rect.height = value; } + } + + public Rect rect{ + + get{ + if(colorTouched){ + colorTouched = false; + GUI.color = new Color(GUI.color.r,GUI.color.g,GUI.color.b,1.0f); + } + if(rotateEnabled){ + if(rotateFinished){ + rotateFinished = false; + rotateEnabled = false; + //this.rotation = 0.0f; + pivot = Vector2.zero; + }else{ + GUIUtility.RotateAroundPivot(rotation, pivot); + } + } + if(alphaEnabled){ + GUI.color = new Color(GUI.color.r,GUI.color.g,GUI.color.b,alpha); + colorTouched = true; + } + if(fontScaleToFit){ + if(this.useSimpleScale){ + style.fontSize = (int)(_rect.height*this.relativeRect.height); + }else{ + style.fontSize = (int)_rect.height; + } + } + return _rect; + } + + set{ + _rect = value; + } + } + + public LTRect setStyle( GUIStyle style ){ + this.style = style; + return this; + } + + public LTRect setFontScaleToFit( bool fontScaleToFit ){ + this.fontScaleToFit = fontScaleToFit; + return this; + } + + public LTRect setColor( Color color ){ + this.color = color; + this.useColor = true; + return this; + } + + public LTRect setAlpha( float alpha ){ + this.alpha = alpha; + return this; + } + + public LTRect setLabel( String str ){ + this.labelStr = str; + return this; + } + + public LTRect setUseSimpleScale( bool useSimpleScale, Rect relativeRect){ + this.useSimpleScale = useSimpleScale; + this.relativeRect = relativeRect; + return this; + } + + public LTRect setUseSimpleScale( bool useSimpleScale){ + this.useSimpleScale = useSimpleScale; + this.relativeRect = new Rect(0f,0f,Screen.width,Screen.height); + return this; + } + + public LTRect setSizeByHeight( bool sizeByHeight){ + this.sizeByHeight = sizeByHeight; + return this; + } + + public override string ToString(){ + return "x:"+_rect.x+" y:"+_rect.y+" width:"+_rect.width+" height:"+_rect.height; + } +} + +/** +* Object that describes the event to an event listener +* @class LTEvent +* @constructor +* @param {object} data:object Data that has been passed from the dispatchEvent method +*/ +public class LTEvent { + public int id; + public object data; + + public LTEvent(int id, object data){ + this.id = id; + this.data = data; + } +} + +public class LTGUI { + public static int RECT_LEVELS = 5; + public static int RECTS_PER_LEVEL = 10; + public static int BUTTONS_MAX = 24; + + private static LTRect[] levels; + private static int[] levelDepths; + private static Rect[] buttons; + private static int[] buttonLevels; + private static int[] buttonLastFrame; + private static LTRect r; + private static Color color = Color.white; + private static bool isGUIEnabled = false; + private static int global_counter = 0; + + public enum Element_Type{ + Texture, + Label + } + + public static void init(){ + if(levels==null){ + levels = new LTRect[RECT_LEVELS*RECTS_PER_LEVEL]; + levelDepths = new int[RECT_LEVELS]; + } + } + + public static void initRectCheck(){ + if(buttons==null){ + buttons = new Rect[BUTTONS_MAX]; + buttonLevels = new int[BUTTONS_MAX]; + buttonLastFrame = new int[BUTTONS_MAX]; + for(int i = 0; i < buttonLevels.Length; i++){ + buttonLevels[i] = -1; + } + } + } + + public static void reset(){ + if(isGUIEnabled){ + isGUIEnabled = false; + for(int i = 0; i < levels.Length; i++){ + levels[i] = null; + } + + for(int i = 0; i < levelDepths.Length; i++){ + levelDepths[i] = 0; + } + } + } + + public static void update( int updateLevel ){ + if(isGUIEnabled){ + init(); + if(levelDepths[updateLevel]>0){ + color = GUI.color; + int baseI = updateLevel*RECTS_PER_LEVEL; + int maxLoop = baseI + levelDepths[updateLevel];// RECTS_PER_LEVEL;//; + + for(int i = baseI; i < maxLoop; i++){ + r = levels[i]; + // Debug.Log("r:"+r+" i:"+i); + if(r!=null /*&& checkOnScreen(r.rect)*/){ + //Debug.Log("label:"+r.labelStr+" textColor:"+r.style.normal.textColor); + if(r.useColor) + GUI.color = r.color; + if(r.type == Element_Type.Label){ + if(r.style!=null) + GUI.skin.label = r.style; + if(r.useSimpleScale){ + GUI.Label( new Rect((r.rect.x + r.margin.x + r.relativeRect.x)*r.relativeRect.width, (r.rect.y + r.margin.y + r.relativeRect.y)*r.relativeRect.height, r.rect.width*r.relativeRect.width, r.rect.height*r.relativeRect.height), r.labelStr ); + }else{ + GUI.Label( new Rect(r.rect.x + r.margin.x, r.rect.y + r.margin.y, r.rect.width, r.rect.height), r.labelStr ); + } + }else if(r.type == Element_Type.Texture && r.texture!=null){ + Vector2 size = r.useSimpleScale ? new Vector2(0f, r.rect.height*r.relativeRect.height) : new Vector2(r.rect.width, r.rect.height); + if(r.sizeByHeight){ + size.x = (float)r.texture.width/(float)r.texture.height * size.y; + } + if(r.useSimpleScale){ + GUI.DrawTexture( new Rect((r.rect.x + r.margin.x + r.relativeRect.x)*r.relativeRect.width, (r.rect.y + r.margin.y + r.relativeRect.y)*r.relativeRect.height, size.x, size.y), r.texture ); + }else{ + GUI.DrawTexture( new Rect(r.rect.x + r.margin.x, r.rect.y + r.margin.y, size.x, size.y), r.texture ); + } + } + } + } + GUI.color = color; + } + } + } + + public static bool checkOnScreen(Rect rect){ + bool offLeft = rect.x + rect.width < 0f; + bool offRight = rect.x > Screen.width; + bool offBottom = rect.y > Screen.height; + bool offTop = rect.y + rect.height < 0f; + + return !(offLeft || offRight || offBottom || offTop); + } + + public static void destroy( int id ){ + int backId = id & 0xFFFF; + int backCounter = id >> 16; + if(id>=0 && levels[backId]!=null && levels[backId].hasInitiliazed && levels[backId].counter==backCounter) + levels[backId] = null; + } + + public static void destroyAll( int depth ){ // clears all gui elements on depth + int maxLoop = depth*RECTS_PER_LEVEL + RECTS_PER_LEVEL; + for(int i = depth*RECTS_PER_LEVEL; levels!=null && i < maxLoop; i++){ + levels[i] = null; + } + } + + public static LTRect label( Rect rect, string label, int depth){ + return LTGUI.label(new LTRect(rect), label, depth); + } + + public static LTRect label( LTRect rect, string label, int depth){ + rect.type = Element_Type.Label; + rect.labelStr = label; + return element(rect, depth); + } + + public static LTRect texture( Rect rect, Texture texture, int depth){ + return LTGUI.texture( new LTRect(rect), texture, depth); + } + + public static LTRect texture( LTRect rect, Texture texture, int depth){ + rect.type = Element_Type.Texture; + rect.texture = texture; + return element(rect, depth); + } + + public static LTRect element( LTRect rect, int depth){ + isGUIEnabled = true; + init(); + int maxLoop = depth*RECTS_PER_LEVEL + RECTS_PER_LEVEL; + int k = 0; + if(rect!=null){ + destroy(rect.id); + } + if(rect.type==LTGUI.Element_Type.Label && rect.style!=null){ + if(rect.style.normal.textColor.a<=0f){ + Debug.LogWarning("Your GUI normal color has an alpha of zero, and will not be rendered."); + } + } + if(rect.relativeRect.width==float.PositiveInfinity){ + rect.relativeRect = new Rect(0f,0f,Screen.width,Screen.height); + } + for(int i = depth*RECTS_PER_LEVEL; i < maxLoop; i++){ + r = levels[i]; + if(r==null){ + r = rect; + r.rotateEnabled = true; + r.alphaEnabled = true; + r.setId( i, global_counter ); + levels[i] = r; + // Debug.Log("k:"+k+ " maxDepth:"+levelDepths[depth]); + if(k>=levelDepths[depth]){ + levelDepths[depth] = k + 1; + } + global_counter++; + return r; + } + k++; + } + + Debug.LogError("You ran out of GUI Element spaces"); + + return null; + } + + public static bool hasNoOverlap( Rect rect, int depth ){ + initRectCheck(); + bool hasNoOverlap = true; + bool wasAddedToList = false; + for(int i = 0; i < buttonLevels.Length; i++){ + // Debug.Log("buttonLastFrame["+i+"]:"+buttonLastFrame[i]); + //Debug.Log("buttonLevels["+i+"]:"+buttonLevels[i]); + if(buttonLevels[i]>=0){ + //Debug.Log("buttonLastFrame["+i+"]:"+buttonLastFrame[i]+" Time.frameCount:"+Time.frameCount); + if( buttonLastFrame[i] + 1 < Time.frameCount ){ // It has to have been visible within the current, or + buttonLevels[i] = -1; + // Debug.Log("resetting i:"+i); + }else{ + //if(buttonLevels[i]>=0) + // Debug.Log("buttonLevels["+i+"]:"+buttonLevels[i]); + if(buttonLevels[i]>depth){ + /*if(firstTouch().x > 0){ + Debug.Log("buttons["+i+"]:"+buttons[i] + " firstTouch:"); + Debug.Log(firstTouch()); + Debug.Log(buttonLevels[i]); + }*/ + if(pressedWithinRect( buttons[i] )){ + hasNoOverlap = false; // there is an overlapping button that is higher + } + } + } + } + + if(wasAddedToList==false && buttonLevels[i]<0){ + wasAddedToList = true; + buttonLevels[i] = depth; + buttons[i] = rect; + buttonLastFrame[i] = Time.frameCount; + } + } + + return hasNoOverlap; + } + + public static bool pressedWithinRect( Rect rect ){ + Vector2 vec2 = firstTouch(); + if(vec2.x<0f) + return false; + float vecY = Screen.height-vec2.y; + return (vec2.x > rect.x && vec2.x < rect.x + rect.width && vecY > rect.y && vecY < rect.y + rect.height); + } + + public static bool checkWithinRect(Vector2 vec2, Rect rect){ + vec2.y = Screen.height-vec2.y; + return (vec2.x > rect.x && vec2.x < rect.x + rect.width && vec2.y > rect.y && vec2.y < rect.y + rect.height); + } + + public static Vector2 firstTouch(){ + if(Input.touchCount>0){ + return Input.touches[0].position; + }else if(Input.GetMouseButton(0)){ + return Input.mousePosition; + } + + return new Vector2(Mathf.NegativeInfinity,Mathf.NegativeInfinity); + } + +} + +namespace DentedPixel { public class LeanDummy {} } +//} diff --git a/GGJ2020/Assets/Plugins/LeanTween/LeanTween.cs.meta b/GGJ2020/Assets/Plugins/LeanTween/LeanTween.cs.meta new file mode 100644 index 0000000..bf90165 --- /dev/null +++ b/GGJ2020/Assets/Plugins/LeanTween/LeanTween.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 9c2f4b27196f84954b44753aaac214bb +timeCreated: 1463137984 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/GGJ2020/Assets/Plugins/LeanTween/LeanTween.dll.zip b/GGJ2020/Assets/Plugins/LeanTween/LeanTween.dll.zip new file mode 100644 index 0000000..513706f --- /dev/null +++ b/GGJ2020/Assets/Plugins/LeanTween/LeanTween.dll.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f6e9d01ac12274bd58f2eeb63a9f2bd5ba30e7dc3c53e22ac86b0b066f9c5204 +size 30942 diff --git a/GGJ2020/Assets/Plugins/LeanTween/LeanTween.dll.zip.meta b/GGJ2020/Assets/Plugins/LeanTween/LeanTween.dll.zip.meta new file mode 100644 index 0000000..345e828 --- /dev/null +++ b/GGJ2020/Assets/Plugins/LeanTween/LeanTween.dll.zip.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ffeadda6aaa064923a3f7e28ff26afb1 +timeCreated: 1477948563 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/GGJ2020/Assets/Scripts/PlayerController.cs b/GGJ2020/Assets/Scripts/PlayerController.cs index 82ca41d..86b3d08 100644 --- a/GGJ2020/Assets/Scripts/PlayerController.cs +++ b/GGJ2020/Assets/Scripts/PlayerController.cs @@ -5,12 +5,13 @@ using UnityEngine; public class PlayerController : MonoBehaviour { public float walkSpeed; + public GameObject model; private Vector2 receivedInput; // Start is called before the first frame update void Start() { - + StartCoroutine((FlipOnAxis())); } public void SetMovement(Vector2 input) @@ -20,19 +21,58 @@ public class PlayerController : MonoBehaviour public void UpdatePosition() { - float RunnerX, RunnerZ; - RunnerZ = Input.GetAxisRaw("Vertical"); - RunnerX = Input.GetAxisRaw("Horizontal"); + float HorseX, HorseZ; + HorseZ = Input.GetAxisRaw("Vertical"); + HorseX = Input.GetAxisRaw("Horizontal"); - //float rotateTo = RotateRunner(RunnerX, RunnerZ); + float rotateTo = RotateObject(HorseX, HorseZ); - RunnerZ = Input.GetAxis("Vertical") * Time.deltaTime * walkSpeed; - RunnerX = Input.GetAxis("Horizontal") * Time.deltaTime * walkSpeed; + HorseZ = Input.GetAxis("Vertical") * Time.deltaTime * walkSpeed; + HorseX = Input.GetAxis("Horizontal") * Time.deltaTime * walkSpeed; - transform.Translate(RunnerX, 0, RunnerZ); + transform.Translate(HorseX, 0, HorseZ); + LeanTween.rotateY(model, rotateTo, 0.1f); + + } + + public float RotateObject(float xInput, float zInput) + { + float to = model.transform.rotation.eulerAngles.y; + //Debug.Log(to); + if (Input.GetAxisRaw("Horizontal") != 0 || Input.GetAxis("Vertical") != 0) + { + if (zInput > 0 && xInput == 0) + to = 0; + else if (zInput < 0 && xInput == 0) + to = 180; + else if (zInput == 0 && xInput > 0) + to = 90; + else if (zInput == 0 && xInput < 0) + to = 270; + else if (zInput > 0 && xInput > 0) + to = 45; + else if (zInput < 0 && xInput > 0) + to = 135; + else if (zInput < 0 && xInput < 0) + to = 225; + else if (zInput > 0 && xInput < 0) + to = 315; + } + + return to; } + public IEnumerator FlipOnAxis() + { + if (Input.GetAxisRaw("Horizontal") != 0 || Input.GetAxis("Vertical") != 0) + { + LeanTween.rotateX(model, -90, 0.1f); + } + yield return new WaitForSeconds(0.5f); + } +} + // Update is called once per frame void Update() { From 9e6f101464554261eb2a1468c1d6e5b47f857096 Mon Sep 17 00:00:00 2001 From: NickFowler Date: Sat, 1 Feb 2020 13:14:48 +1100 Subject: [PATCH 2/4] Scene update --- GGJ2020/Assets/Scenes.meta | 8 + GGJ2020/Assets/Scenes/SampleScene.unity | 457 +++++++++++++++++++ GGJ2020/Assets/Scenes/SampleScene.unity.meta | 7 + 3 files changed, 472 insertions(+) create mode 100644 GGJ2020/Assets/Scenes.meta create mode 100644 GGJ2020/Assets/Scenes/SampleScene.unity create mode 100644 GGJ2020/Assets/Scenes/SampleScene.unity.meta diff --git a/GGJ2020/Assets/Scenes.meta b/GGJ2020/Assets/Scenes.meta new file mode 100644 index 0000000..cd10b69 --- /dev/null +++ b/GGJ2020/Assets/Scenes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 05a69edb64a15cf4bbaa7407f6318121 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/GGJ2020/Assets/Scenes/SampleScene.unity b/GGJ2020/Assets/Scenes/SampleScene.unity new file mode 100644 index 0000000..0c4f74a --- /dev/null +++ b/GGJ2020/Assets/Scenes/SampleScene.unity @@ -0,0 +1,457 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 705507994} + m_IndirectSpecularColor: {r: 0.44657844, g: 0.49641222, b: 0.57481694, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 0 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 500 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 1 +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &705507993 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 705507995} + - component: {fileID: 705507994} + m_Layer: 0 + m_Name: Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &705507994 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 705507993} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 1 + m_Shape: 0 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 1 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &705507995 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 705507993} + m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1 &963194225 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 963194228} + - component: {fileID: 963194227} + - component: {fileID: 963194226} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &963194226 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 963194225} + m_Enabled: 1 +--- !u!20 &963194227 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 963194225} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &963194228 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 963194225} + m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} + m_LocalPosition: {x: 0, y: 15.53, z: -1.4} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} +--- !u!1 &1451704393 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1451704396} + - component: {fileID: 1451704395} + - component: {fileID: 1451704394} + m_Layer: 0 + m_Name: Model + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!33 &1451704394 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1451704393} + m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &1451704395 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1451704393} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!4 &1451704396 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1451704393} + m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1975754340} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} +--- !u!1 &1975754334 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1975754340} + - component: {fileID: 1975754337} + - component: {fileID: 1975754336} + - component: {fileID: 1975754335} + m_Layer: 0 + m_Name: Capsule + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!143 &1975754335 +CharacterController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1975754334} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Height: 2 + m_Radius: 0.5 + m_SlopeLimit: 45 + m_StepOffset: 0.3 + m_SkinWidth: 0.08 + m_MinMoveDistance: 0.001 + m_Center: {x: 0, y: 0, z: 0} +--- !u!114 &1975754336 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1975754334} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8f7fbcfa6410c204e8977bb70e5ff84b, type: 3} + m_Name: + m_EditorClassIdentifier: + walkSpeed: 10 + model: {fileID: 1451704393} +--- !u!136 &1975754337 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1975754334} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + m_Radius: 0.5 + m_Height: 2 + m_Direction: 1 + m_Center: {x: 0, y: 0, z: 0} +--- !u!4 &1975754340 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1975754334} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -0.7251444, y: 1.8377934, z: -0.25297546} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1451704396} + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/GGJ2020/Assets/Scenes/SampleScene.unity.meta b/GGJ2020/Assets/Scenes/SampleScene.unity.meta new file mode 100644 index 0000000..952bd1e --- /dev/null +++ b/GGJ2020/Assets/Scenes/SampleScene.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9fc0d4010bbf28b4594072e72b8655ab +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: From c6242fb1ebdef5a5ce95baec1624d27d81aa7fd2 Mon Sep 17 00:00:00 2001 From: Joshua Reason Date: Sat, 1 Feb 2020 13:00:24 +1100 Subject: [PATCH 3/4] Spawning works --- Assets/Scripts.meta | 8 + Assets/Scripts/Extensions.meta | 8 + .../Extensions/GameObjectExtensions.cs | 27 + .../Extensions/GameObjectExtensions.cs.meta | 11 + .../Extensions/IEnumeratorExtensions.cs | 20 + .../Extensions/IEnumeratorExtensions.cs.meta | 11 + Assets/Scripts/Input.meta | 8 + Assets/Scripts/Input/HerdController.cs | 109 +++ Assets/Scripts/Input/HerdController.cs.meta | 11 + Assets/Scripts/Input/PlayerInput.cs | 14 + Assets/Scripts/Input/PlayerInput.cs.meta | 11 + Assets/WorldAssets.meta | 8 + Assets/WorldAssets/Prefabs.meta | 8 + Assets/WorldAssets/Prefabs/Cube.prefab | 722 ++++++++++++++++++ Assets/WorldAssets/Prefabs/Cube.prefab.meta | 7 + Packages/manifest.json | 6 +- ProjectSettings/EditorSettings.asset | 4 +- ProjectSettings/ProjectSettings.asset | 2 +- ProjectSettings/XRSettings.asset | 3 + 19 files changed, 990 insertions(+), 8 deletions(-) create mode 100644 Assets/Scripts.meta create mode 100644 Assets/Scripts/Extensions.meta create mode 100644 Assets/Scripts/Extensions/GameObjectExtensions.cs create mode 100644 Assets/Scripts/Extensions/GameObjectExtensions.cs.meta create mode 100644 Assets/Scripts/Extensions/IEnumeratorExtensions.cs create mode 100644 Assets/Scripts/Extensions/IEnumeratorExtensions.cs.meta create mode 100644 Assets/Scripts/Input.meta create mode 100644 Assets/Scripts/Input/HerdController.cs create mode 100644 Assets/Scripts/Input/HerdController.cs.meta create mode 100644 Assets/Scripts/Input/PlayerInput.cs create mode 100644 Assets/Scripts/Input/PlayerInput.cs.meta create mode 100644 Assets/WorldAssets.meta create mode 100644 Assets/WorldAssets/Prefabs.meta create mode 100644 Assets/WorldAssets/Prefabs/Cube.prefab create mode 100644 Assets/WorldAssets/Prefabs/Cube.prefab.meta create mode 100644 ProjectSettings/XRSettings.asset diff --git a/Assets/Scripts.meta b/Assets/Scripts.meta new file mode 100644 index 0000000..28b8607 --- /dev/null +++ b/Assets/Scripts.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e4e55e760faeb37429ec3c49147eeddb +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Extensions.meta b/Assets/Scripts/Extensions.meta new file mode 100644 index 0000000..0bf0817 --- /dev/null +++ b/Assets/Scripts/Extensions.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 350620ed502be474682f2e7bb035a7da +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Extensions/GameObjectExtensions.cs b/Assets/Scripts/Extensions/GameObjectExtensions.cs new file mode 100644 index 0000000..6e8bcea --- /dev/null +++ b/Assets/Scripts/Extensions/GameObjectExtensions.cs @@ -0,0 +1,27 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public static class GameObjectExtensions +{ + + /// + /// Retourns the bounds of all colliders in a gameobject + /// + /// Gameobject to get bounds of + /// Bounds of gameobject + public static Bounds GetBounds(this GameObject gameObject) + { + + Bounds bounds = new Bounds(gameObject.transform.position, Vector3.zero); + Collider[] colliders = gameObject.GetComponentsInChildren(); + foreach (Collider col in colliders) + { + bounds.Encapsulate(col.bounds); + } + + return bounds; + } + + +} diff --git a/Assets/Scripts/Extensions/GameObjectExtensions.cs.meta b/Assets/Scripts/Extensions/GameObjectExtensions.cs.meta new file mode 100644 index 0000000..4b80232 --- /dev/null +++ b/Assets/Scripts/Extensions/GameObjectExtensions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a2d722badd419ef41af065f5a20e1d6a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Extensions/IEnumeratorExtensions.cs b/Assets/Scripts/Extensions/IEnumeratorExtensions.cs new file mode 100644 index 0000000..567b2fd --- /dev/null +++ b/Assets/Scripts/Extensions/IEnumeratorExtensions.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections; +using System.Collections.Generic; + + +public static class IEnumeratorExtensions +{ + + /// + /// Loops through all items in a a collection and applies an action to them + /// + /// collection to loop through + /// Action to apply + public static void ForEach(this IEnumerable collection, Action action) + { + foreach (var item in collection) + action(item); + } + +} diff --git a/Assets/Scripts/Extensions/IEnumeratorExtensions.cs.meta b/Assets/Scripts/Extensions/IEnumeratorExtensions.cs.meta new file mode 100644 index 0000000..bdebb46 --- /dev/null +++ b/Assets/Scripts/Extensions/IEnumeratorExtensions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 30158a79502552f40b6d620e395eca97 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Input.meta b/Assets/Scripts/Input.meta new file mode 100644 index 0000000..dea12fc --- /dev/null +++ b/Assets/Scripts/Input.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 71d28c61f04eed74db2db1ea83ee2e20 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Input/HerdController.cs b/Assets/Scripts/Input/HerdController.cs new file mode 100644 index 0000000..f74ab32 --- /dev/null +++ b/Assets/Scripts/Input/HerdController.cs @@ -0,0 +1,109 @@ +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEngine.InputSystem; + +public class HerdController : MonoBehaviour +{ + + [SerializeField] + private GameObject Prefab; + + [SerializeField] + private int HerdCount = 50; + + [SerializeField] + private Transform SpawnPoint; + + private List Herd; + + + + //Recieved movement input from player + private void OnMovement(InputValue value) + { + Vector2 input = value.Get(); + + } + + + [ContextMenu("Spawn")] + private void SpawnHerd() + { + float radius = 0; + GameObject prefabExample = Instantiate(Prefab); + Bounds bound = prefabExample.GetBounds(); + Debug.Log(bound.size); + Destroy(prefabExample); + + if (Herd != null) + Herd.ForEach(p => Destroy(p)); + Herd = new List(); + + for (int i = 0; i < HerdCount; i++) + { + + + + int SpawnAttempt = 0; + while (true) + { + + Vector3 position = Vector3.ProjectOnPlane(Random.onUnitSphere, Vector3.up) * radius; + Quaternion rotation = Quaternion.Euler(0, Random.Range(-25, 25), 0); + if (SpawnPoint != null) + position += SpawnPoint.position; + + if (SpawnPositionValid(position,rotation, bound)) + { + GameObject newObject = Instantiate(Prefab, position, rotation, transform); + + Herd.Add(newObject); + + + break; + } + + + SpawnAttempt++; + if (SpawnAttempt % 10 == 0) + { + radius += bound.size.magnitude; + } + if (SpawnAttempt == 100) + break; + } + + + + Debug.Log("Total Spawned: " + Herd.Count); + } + } + + + private bool SpawnPositionValid(Vector3 position,Quaternion rotation ,Bounds bound) + { + Collider[] colliders = Physics.OverlapBox(position, bound.extents,rotation); + + Debug.DrawLine(position, position + Vector3.up); + + foreach(Collider col in colliders) + { + if (col.GetComponentInChildren()) + return false; + if (col.GetComponentInParent()) + return false; + } + + return true; + } + + + + + + + + +} diff --git a/Assets/Scripts/Input/HerdController.cs.meta b/Assets/Scripts/Input/HerdController.cs.meta new file mode 100644 index 0000000..7334c13 --- /dev/null +++ b/Assets/Scripts/Input/HerdController.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 98ac8f1294983784896047d8a4f215cc +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Input/PlayerInput.cs b/Assets/Scripts/Input/PlayerInput.cs new file mode 100644 index 0000000..20d0a34 --- /dev/null +++ b/Assets/Scripts/Input/PlayerInput.cs @@ -0,0 +1,14 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.InputSystem; + +public class PlayerInput : MonoBehaviour +{ + + + + + + +} diff --git a/Assets/Scripts/Input/PlayerInput.cs.meta b/Assets/Scripts/Input/PlayerInput.cs.meta new file mode 100644 index 0000000..96f2c0e --- /dev/null +++ b/Assets/Scripts/Input/PlayerInput.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7d4759e6c92fbb544a1d1b4204f55bb0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/WorldAssets.meta b/Assets/WorldAssets.meta new file mode 100644 index 0000000..8a8db1e --- /dev/null +++ b/Assets/WorldAssets.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4162c46c3c5d2a6439d1ba50ab80e807 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/WorldAssets/Prefabs.meta b/Assets/WorldAssets/Prefabs.meta new file mode 100644 index 0000000..b39db4c --- /dev/null +++ b/Assets/WorldAssets/Prefabs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 56c9f112dc12f9942943d0eaed4140e8 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/WorldAssets/Prefabs/Cube.prefab b/Assets/WorldAssets/Prefabs/Cube.prefab new file mode 100644 index 0000000..f9fe4c3 --- /dev/null +++ b/Assets/WorldAssets/Prefabs/Cube.prefab @@ -0,0 +1,722 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &588491153375435794 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1281286576698487906} + - component: {fileID: -641725564868193174} + - component: {fileID: 6187295151528677371} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1281286576698487906 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 588491153375435794} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 8693433057835279953} + - {fileID: 7081464788313828805} + - {fileID: 1317434602306065355} + - {fileID: 2458785659072919632} + - {fileID: 1652654074722291708} + - {fileID: 687741958870159176} + - {fileID: 1731993206513226773} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!143 &-641725564868193174 +CharacterController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 588491153375435794} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Height: 1 + m_Radius: 0.5 + m_SlopeLimit: 45 + m_StepOffset: 0.3 + m_SkinWidth: 0.08 + m_MinMoveDistance: 0.001 + m_Center: {x: 0, y: 0, z: 0} +--- !u!114 &6187295151528677371 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 588491153375435794} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 58f8f74b224d33d458c143811ba0a32a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &4098178456956087476 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8693433057835279953} + - component: {fileID: 3408687827627113941} + - component: {fileID: 4117636761794079690} + - component: {fileID: 5439993084863149964} + m_Layer: 0 + m_Name: Head + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &8693433057835279953 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4098178456956087476} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 1.5769999, z: 1.122} + m_LocalScale: {x: 0.75, y: 0.75, z: 0.75} + m_Children: [] + m_Father: {fileID: 1281286576698487906} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &3408687827627113941 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4098178456956087476} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &4117636761794079690 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4098178456956087476} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &5439993084863149964 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4098178456956087476} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!1 &5120630305191104536 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7081464788313828805} + - component: {fileID: 7685062163661953742} + - component: {fileID: 4944742435263808408} + - component: {fileID: 4274866573147211313} + m_Layer: 0 + m_Name: Body + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &7081464788313828805 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5120630305191104536} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1.15, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1.9516052} + m_Children: [] + m_Father: {fileID: 1281286576698487906} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &7685062163661953742 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5120630305191104536} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &4944742435263808408 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5120630305191104536} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &4274866573147211313 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5120630305191104536} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!1 &5590395806464076843 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 687741958870159176} + - component: {fileID: 1656380854808313308} + - component: {fileID: 6633278385862986570} + - component: {fileID: 7926437767232469158} + m_Layer: 0 + m_Name: Leg (3) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &687741958870159176 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5590395806464076843} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -0.287, y: 0.5, z: 0.85600007} + m_LocalScale: {x: 0.25, y: 1, z: 0.25} + m_Children: [] + m_Father: {fileID: 1281286576698487906} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &1656380854808313308 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5590395806464076843} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &6633278385862986570 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5590395806464076843} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &7926437767232469158 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5590395806464076843} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!1 &5719689421870306371 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1652654074722291708} + - component: {fileID: 4078304044670255415} + - component: {fileID: 5899197829806382979} + - component: {fileID: 3561170898367215795} + m_Layer: 0 + m_Name: Leg (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1652654074722291708 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5719689421870306371} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.287, y: 0.5, z: 0.856} + m_LocalScale: {x: 0.25, y: 1, z: 0.25} + m_Children: [] + m_Father: {fileID: 1281286576698487906} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &4078304044670255415 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5719689421870306371} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &5899197829806382979 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5719689421870306371} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &3561170898367215795 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5719689421870306371} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!1 &6023423925151217322 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2458785659072919632} + - component: {fileID: 8368978549285348078} + - component: {fileID: 227421258332946785} + - component: {fileID: 2672872958640060053} + m_Layer: 0 + m_Name: Leg (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2458785659072919632 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6023423925151217322} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -0.287, y: 0.5, z: -0.831} + m_LocalScale: {x: 0.25, y: 1, z: 0.25} + m_Children: [] + m_Father: {fileID: 1281286576698487906} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &8368978549285348078 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6023423925151217322} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &227421258332946785 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6023423925151217322} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &2672872958640060053 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6023423925151217322} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!1 &8581093605333690737 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1317434602306065355} + - component: {fileID: 3155864709534259154} + - component: {fileID: 5430449861964831563} + - component: {fileID: 4959990776572585882} + m_Layer: 0 + m_Name: Leg + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1317434602306065355 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8581093605333690737} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.287, y: 0.5, z: -0.831} + m_LocalScale: {x: 0.25, y: 1, z: 0.25} + m_Children: [] + m_Father: {fileID: 1281286576698487906} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &3155864709534259154 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8581093605333690737} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &5430449861964831563 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8581093605333690737} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &4959990776572585882 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8581093605333690737} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!1 &9126933740159724447 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1731993206513226773} + - component: {fileID: 2742579948045331747} + - component: {fileID: 4735444314316498268} + - component: {fileID: 7701254682689962718} + m_Layer: 0 + m_Name: Tail + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1731993206513226773 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9126933740159724447} + m_LocalRotation: {x: 0.38506573, y: 0.11058565, z: 0.006699872, w: 0.9162152} + m_LocalPosition: {x: 0, y: 1.06, z: -1.08} + m_LocalScale: {x: 0.04289, y: 1, z: 0.158686} + m_Children: [] + m_Father: {fileID: 1281286576698487906} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 44.759003, y: 17.016, z: 7.8870006} +--- !u!33 &2742579948045331747 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9126933740159724447} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &4735444314316498268 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9126933740159724447} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &7701254682689962718 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9126933740159724447} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} diff --git a/Assets/WorldAssets/Prefabs/Cube.prefab.meta b/Assets/WorldAssets/Prefabs/Cube.prefab.meta new file mode 100644 index 0000000..2e1ee2d --- /dev/null +++ b/Assets/WorldAssets/Prefabs/Cube.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4d11c77c6b58b7040a8596bc47f45d97 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/manifest.json b/Packages/manifest.json index 3ce4356..67975f7 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -2,13 +2,9 @@ "dependencies": { "com.unity.2d.sprite": "1.0.0", "com.unity.2d.tilemap": "1.0.0", - "com.unity.ads": "2.0.8", - "com.unity.analytics": "3.3.5", "com.unity.collab-proxy": "1.2.16", - "com.unity.ide.rider": "1.1.4", "com.unity.ide.vscode": "1.1.4", - "com.unity.purchasing": "2.0.6", - "com.unity.test-framework": "1.1.9", + "com.unity.inputsystem": "1.0.0-preview.4", "com.unity.textmeshpro": "2.0.1", "com.unity.timeline": "1.2.10", "com.unity.ugui": "1.0.0", diff --git a/ProjectSettings/EditorSettings.asset b/ProjectSettings/EditorSettings.asset index d416a7e..fffd5d4 100644 --- a/ProjectSettings/EditorSettings.asset +++ b/ProjectSettings/EditorSettings.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:30ca3d503940fef2b070e82702f012048c7c6aa88dca5efa76ace9e29279f2f2 -size 789 +oid sha256:8f66fbbdb937ccf18864e9c1f86b4c4693dac34dc62807036cf2ca7c212a855e +size 1107 diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 5dc744f..0baf6ca 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:274e8cfe1c850a47abb770a53f4dc27aa01f27ecc7c18210fdb50d0aa1399d74 +oid sha256:b50184ab955268100594c3cda781e100df7a041527c347251b6adb7f95666af1 size 19180 diff --git a/ProjectSettings/XRSettings.asset b/ProjectSettings/XRSettings.asset new file mode 100644 index 0000000..bfefb85 --- /dev/null +++ b/ProjectSettings/XRSettings.asset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:edd2beb4a2e388312b4b7da241aa51070434005d82c59363f1237dd2e567585f +size 158 From cc3c34f61098141567125f622c1896734b781da9 Mon Sep 17 00:00:00 2001 From: NickFowler Date: Sat, 1 Feb 2020 13:39:51 +1100 Subject: [PATCH 4/4] Fixing folder structure --- .../LeanTween/Documentation.meta | 0 .../LeanTween/Documentation/assets.meta | 0 .../LeanTween/Documentation/assets/css.meta | 0 .../Documentation/assets/css/main.css | 0 .../Documentation/assets/css/main.css.meta | 0 .../Documentation/assets/favicon.ico | Bin .../Documentation/assets/favicon.ico.meta | 0 .../LeanTween/Documentation/assets/index.html | 0 .../Documentation/assets/index.html.meta | 0 .../LeanTween/Documentation/classes.meta | 0 .../Documentation/classes/LTBezierPath.html | 0 .../classes/LTBezierPath.html.meta | 0 .../Documentation/classes/LTDescr.html | 0 .../Documentation/classes/LTDescr.html.meta | 0 .../Documentation/classes/LTEvent.html | 0 .../Documentation/classes/LTEvent.html.meta | 0 .../Documentation/classes/LTRect.html | 0 .../Documentation/classes/LTRect.html.meta | 0 .../Documentation/classes/LTSeq.html | 0 .../Documentation/classes/LTSeq.html.meta | 0 .../Documentation/classes/LTSpline.html | 0 .../Documentation/classes/LTSpline.html.meta | 0 .../Documentation/classes/LeanAudio.html | 0 .../Documentation/classes/LeanAudio.html.meta | 0 .../classes/LeanAudioOptions.html | 0 .../classes/LeanAudioOptions.html.meta | 0 .../Documentation/classes/LeanTween.html | 0 .../Documentation/classes/LeanTween.html.meta | 0 .../Documentation/classes/LeanTweenType.html | 0 .../classes/LeanTweenType.html.meta | 0 .../Documentation/classes/index.html | 0 .../Documentation/classes/index.html.meta | 0 .../LeanTween/Documentation/elements.meta | 0 .../Documentation/elements/index.html | 0 .../Documentation/elements/index.html.meta | 0 .../LeanTween/Documentation/index.html | 0 .../LeanTween/Documentation/index.html.meta | 0 .../Assets => Assets}/LeanTween/Editor.meta | 0 .../Editor/LeanTweenDocumentationEditor.cs | 0 .../LeanTweenDocumentationEditor.cs.meta | 0 .../Assets => Assets}/LeanTween/License.txt | 0 .../LeanTween/License.txt.meta | 0 .../Assets => Assets}/LeanTween/ReadMe.txt | 0 .../LeanTween/ReadMe.txt.meta | 0 .../Assets => Assets}/Plugins/LeanTween.meta | 0 .../Plugins/LeanTween/LTDescr.cs | 0 .../Plugins/LeanTween/LTDescr.cs.meta | 0 .../Plugins/LeanTween/LTDescrOptional.cs | 0 .../Plugins/LeanTween/LTDescrOptional.cs.meta | 0 .../Plugins/LeanTween/LTSeq.cs | 0 .../Plugins/LeanTween/LTSeq.cs.meta | 0 .../Plugins/LeanTween/LeanAudio.cs | 0 .../Plugins/LeanTween/LeanAudio.cs.meta | 0 .../Plugins/LeanTween/LeanTest.cs | 0 .../Plugins/LeanTween/LeanTest.cs.meta | 0 .../Plugins/LeanTween/LeanTween.cs | 0 .../Plugins/LeanTween/LeanTween.cs.meta | 0 .../Plugins/LeanTween/LeanTween.dll.zip | 0 .../Plugins/LeanTween/LeanTween.dll.zip.meta | 0 Assets/Scenes/SampleScene.unity | 230 ++++++++- .../Scripts/Input}/PlayerController.cs | 0 .../Scripts/Input}/PlayerController.cs.meta | 0 GGJ2020/Assets/LeanTween.meta | 2 - GGJ2020/Assets/Plugins.meta | 2 - GGJ2020/Assets/Scenes.meta | 8 - GGJ2020/Assets/Scenes/SampleScene.unity | 457 ------------------ GGJ2020/Assets/Scenes/SampleScene.unity.meta | 7 - GGJ2020/Assets/Scripts.meta | 8 - GGJ2020/Logs/Packages-Update.log | 45 -- GGJ2020/Packages/manifest.json | 42 -- GGJ2020/ProjectSettings/XRSettings.asset | 3 - 71 files changed, 214 insertions(+), 590 deletions(-) rename {GGJ2020/Assets => Assets}/LeanTween/Documentation.meta (100%) rename {GGJ2020/Assets => Assets}/LeanTween/Documentation/assets.meta (100%) rename {GGJ2020/Assets => Assets}/LeanTween/Documentation/assets/css.meta (100%) rename {GGJ2020/Assets => Assets}/LeanTween/Documentation/assets/css/main.css (100%) rename {GGJ2020/Assets => Assets}/LeanTween/Documentation/assets/css/main.css.meta (100%) rename {GGJ2020/Assets => Assets}/LeanTween/Documentation/assets/favicon.ico (100%) rename {GGJ2020/Assets => Assets}/LeanTween/Documentation/assets/favicon.ico.meta (100%) rename {GGJ2020/Assets => Assets}/LeanTween/Documentation/assets/index.html (100%) rename {GGJ2020/Assets => Assets}/LeanTween/Documentation/assets/index.html.meta (100%) rename {GGJ2020/Assets => Assets}/LeanTween/Documentation/classes.meta (100%) rename {GGJ2020/Assets => Assets}/LeanTween/Documentation/classes/LTBezierPath.html (100%) rename {GGJ2020/Assets => Assets}/LeanTween/Documentation/classes/LTBezierPath.html.meta (100%) rename {GGJ2020/Assets => Assets}/LeanTween/Documentation/classes/LTDescr.html (100%) rename {GGJ2020/Assets => Assets}/LeanTween/Documentation/classes/LTDescr.html.meta (100%) rename {GGJ2020/Assets => Assets}/LeanTween/Documentation/classes/LTEvent.html (100%) rename {GGJ2020/Assets => Assets}/LeanTween/Documentation/classes/LTEvent.html.meta (100%) rename {GGJ2020/Assets => Assets}/LeanTween/Documentation/classes/LTRect.html (100%) rename {GGJ2020/Assets => Assets}/LeanTween/Documentation/classes/LTRect.html.meta (100%) rename {GGJ2020/Assets => Assets}/LeanTween/Documentation/classes/LTSeq.html (100%) rename {GGJ2020/Assets => Assets}/LeanTween/Documentation/classes/LTSeq.html.meta (100%) rename {GGJ2020/Assets => Assets}/LeanTween/Documentation/classes/LTSpline.html (100%) rename {GGJ2020/Assets => Assets}/LeanTween/Documentation/classes/LTSpline.html.meta (100%) rename {GGJ2020/Assets => Assets}/LeanTween/Documentation/classes/LeanAudio.html (100%) rename {GGJ2020/Assets => Assets}/LeanTween/Documentation/classes/LeanAudio.html.meta (100%) rename {GGJ2020/Assets => Assets}/LeanTween/Documentation/classes/LeanAudioOptions.html (100%) rename {GGJ2020/Assets => Assets}/LeanTween/Documentation/classes/LeanAudioOptions.html.meta (100%) rename {GGJ2020/Assets => Assets}/LeanTween/Documentation/classes/LeanTween.html (100%) rename {GGJ2020/Assets => Assets}/LeanTween/Documentation/classes/LeanTween.html.meta (100%) rename {GGJ2020/Assets => Assets}/LeanTween/Documentation/classes/LeanTweenType.html (100%) rename {GGJ2020/Assets => Assets}/LeanTween/Documentation/classes/LeanTweenType.html.meta (100%) rename {GGJ2020/Assets => Assets}/LeanTween/Documentation/classes/index.html (100%) rename {GGJ2020/Assets => Assets}/LeanTween/Documentation/classes/index.html.meta (100%) rename {GGJ2020/Assets => Assets}/LeanTween/Documentation/elements.meta (100%) rename {GGJ2020/Assets => Assets}/LeanTween/Documentation/elements/index.html (100%) rename {GGJ2020/Assets => Assets}/LeanTween/Documentation/elements/index.html.meta (100%) rename {GGJ2020/Assets => Assets}/LeanTween/Documentation/index.html (100%) rename {GGJ2020/Assets => Assets}/LeanTween/Documentation/index.html.meta (100%) rename {GGJ2020/Assets => Assets}/LeanTween/Editor.meta (100%) rename {GGJ2020/Assets => Assets}/LeanTween/Editor/LeanTweenDocumentationEditor.cs (100%) rename {GGJ2020/Assets => Assets}/LeanTween/Editor/LeanTweenDocumentationEditor.cs.meta (100%) rename {GGJ2020/Assets => Assets}/LeanTween/License.txt (100%) rename {GGJ2020/Assets => Assets}/LeanTween/License.txt.meta (100%) rename {GGJ2020/Assets => Assets}/LeanTween/ReadMe.txt (100%) rename {GGJ2020/Assets => Assets}/LeanTween/ReadMe.txt.meta (100%) rename {GGJ2020/Assets => Assets}/Plugins/LeanTween.meta (100%) rename {GGJ2020/Assets => Assets}/Plugins/LeanTween/LTDescr.cs (100%) rename {GGJ2020/Assets => Assets}/Plugins/LeanTween/LTDescr.cs.meta (100%) rename {GGJ2020/Assets => Assets}/Plugins/LeanTween/LTDescrOptional.cs (100%) rename {GGJ2020/Assets => Assets}/Plugins/LeanTween/LTDescrOptional.cs.meta (100%) rename {GGJ2020/Assets => Assets}/Plugins/LeanTween/LTSeq.cs (100%) rename {GGJ2020/Assets => Assets}/Plugins/LeanTween/LTSeq.cs.meta (100%) rename {GGJ2020/Assets => Assets}/Plugins/LeanTween/LeanAudio.cs (100%) rename {GGJ2020/Assets => Assets}/Plugins/LeanTween/LeanAudio.cs.meta (100%) rename {GGJ2020/Assets => Assets}/Plugins/LeanTween/LeanTest.cs (100%) rename {GGJ2020/Assets => Assets}/Plugins/LeanTween/LeanTest.cs.meta (100%) rename {GGJ2020/Assets => Assets}/Plugins/LeanTween/LeanTween.cs (100%) rename {GGJ2020/Assets => Assets}/Plugins/LeanTween/LeanTween.cs.meta (100%) rename {GGJ2020/Assets => Assets}/Plugins/LeanTween/LeanTween.dll.zip (100%) rename {GGJ2020/Assets => Assets}/Plugins/LeanTween/LeanTween.dll.zip.meta (100%) rename {GGJ2020/Assets/Scripts => Assets/Scripts/Input}/PlayerController.cs (100%) rename {GGJ2020/Assets/Scripts => Assets/Scripts/Input}/PlayerController.cs.meta (100%) delete mode 100644 GGJ2020/Assets/LeanTween.meta delete mode 100644 GGJ2020/Assets/Plugins.meta delete mode 100644 GGJ2020/Assets/Scenes.meta delete mode 100644 GGJ2020/Assets/Scenes/SampleScene.unity delete mode 100644 GGJ2020/Assets/Scenes/SampleScene.unity.meta delete mode 100644 GGJ2020/Assets/Scripts.meta delete mode 100644 GGJ2020/Logs/Packages-Update.log delete mode 100644 GGJ2020/Packages/manifest.json delete mode 100644 GGJ2020/ProjectSettings/XRSettings.asset diff --git a/GGJ2020/Assets/LeanTween/Documentation.meta b/Assets/LeanTween/Documentation.meta similarity index 100% rename from GGJ2020/Assets/LeanTween/Documentation.meta rename to Assets/LeanTween/Documentation.meta diff --git a/GGJ2020/Assets/LeanTween/Documentation/assets.meta b/Assets/LeanTween/Documentation/assets.meta similarity index 100% rename from GGJ2020/Assets/LeanTween/Documentation/assets.meta rename to Assets/LeanTween/Documentation/assets.meta diff --git a/GGJ2020/Assets/LeanTween/Documentation/assets/css.meta b/Assets/LeanTween/Documentation/assets/css.meta similarity index 100% rename from GGJ2020/Assets/LeanTween/Documentation/assets/css.meta rename to Assets/LeanTween/Documentation/assets/css.meta diff --git a/GGJ2020/Assets/LeanTween/Documentation/assets/css/main.css b/Assets/LeanTween/Documentation/assets/css/main.css similarity index 100% rename from GGJ2020/Assets/LeanTween/Documentation/assets/css/main.css rename to Assets/LeanTween/Documentation/assets/css/main.css diff --git a/GGJ2020/Assets/LeanTween/Documentation/assets/css/main.css.meta b/Assets/LeanTween/Documentation/assets/css/main.css.meta similarity index 100% rename from GGJ2020/Assets/LeanTween/Documentation/assets/css/main.css.meta rename to Assets/LeanTween/Documentation/assets/css/main.css.meta diff --git a/GGJ2020/Assets/LeanTween/Documentation/assets/favicon.ico b/Assets/LeanTween/Documentation/assets/favicon.ico similarity index 100% rename from GGJ2020/Assets/LeanTween/Documentation/assets/favicon.ico rename to Assets/LeanTween/Documentation/assets/favicon.ico diff --git a/GGJ2020/Assets/LeanTween/Documentation/assets/favicon.ico.meta b/Assets/LeanTween/Documentation/assets/favicon.ico.meta similarity index 100% rename from GGJ2020/Assets/LeanTween/Documentation/assets/favicon.ico.meta rename to Assets/LeanTween/Documentation/assets/favicon.ico.meta diff --git a/GGJ2020/Assets/LeanTween/Documentation/assets/index.html b/Assets/LeanTween/Documentation/assets/index.html similarity index 100% rename from GGJ2020/Assets/LeanTween/Documentation/assets/index.html rename to Assets/LeanTween/Documentation/assets/index.html diff --git a/GGJ2020/Assets/LeanTween/Documentation/assets/index.html.meta b/Assets/LeanTween/Documentation/assets/index.html.meta similarity index 100% rename from GGJ2020/Assets/LeanTween/Documentation/assets/index.html.meta rename to Assets/LeanTween/Documentation/assets/index.html.meta diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes.meta b/Assets/LeanTween/Documentation/classes.meta similarity index 100% rename from GGJ2020/Assets/LeanTween/Documentation/classes.meta rename to Assets/LeanTween/Documentation/classes.meta diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LTBezierPath.html b/Assets/LeanTween/Documentation/classes/LTBezierPath.html similarity index 100% rename from GGJ2020/Assets/LeanTween/Documentation/classes/LTBezierPath.html rename to Assets/LeanTween/Documentation/classes/LTBezierPath.html diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LTBezierPath.html.meta b/Assets/LeanTween/Documentation/classes/LTBezierPath.html.meta similarity index 100% rename from GGJ2020/Assets/LeanTween/Documentation/classes/LTBezierPath.html.meta rename to Assets/LeanTween/Documentation/classes/LTBezierPath.html.meta diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LTDescr.html b/Assets/LeanTween/Documentation/classes/LTDescr.html similarity index 100% rename from GGJ2020/Assets/LeanTween/Documentation/classes/LTDescr.html rename to Assets/LeanTween/Documentation/classes/LTDescr.html diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LTDescr.html.meta b/Assets/LeanTween/Documentation/classes/LTDescr.html.meta similarity index 100% rename from GGJ2020/Assets/LeanTween/Documentation/classes/LTDescr.html.meta rename to Assets/LeanTween/Documentation/classes/LTDescr.html.meta diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LTEvent.html b/Assets/LeanTween/Documentation/classes/LTEvent.html similarity index 100% rename from GGJ2020/Assets/LeanTween/Documentation/classes/LTEvent.html rename to Assets/LeanTween/Documentation/classes/LTEvent.html diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LTEvent.html.meta b/Assets/LeanTween/Documentation/classes/LTEvent.html.meta similarity index 100% rename from GGJ2020/Assets/LeanTween/Documentation/classes/LTEvent.html.meta rename to Assets/LeanTween/Documentation/classes/LTEvent.html.meta diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LTRect.html b/Assets/LeanTween/Documentation/classes/LTRect.html similarity index 100% rename from GGJ2020/Assets/LeanTween/Documentation/classes/LTRect.html rename to Assets/LeanTween/Documentation/classes/LTRect.html diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LTRect.html.meta b/Assets/LeanTween/Documentation/classes/LTRect.html.meta similarity index 100% rename from GGJ2020/Assets/LeanTween/Documentation/classes/LTRect.html.meta rename to Assets/LeanTween/Documentation/classes/LTRect.html.meta diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LTSeq.html b/Assets/LeanTween/Documentation/classes/LTSeq.html similarity index 100% rename from GGJ2020/Assets/LeanTween/Documentation/classes/LTSeq.html rename to Assets/LeanTween/Documentation/classes/LTSeq.html diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LTSeq.html.meta b/Assets/LeanTween/Documentation/classes/LTSeq.html.meta similarity index 100% rename from GGJ2020/Assets/LeanTween/Documentation/classes/LTSeq.html.meta rename to Assets/LeanTween/Documentation/classes/LTSeq.html.meta diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LTSpline.html b/Assets/LeanTween/Documentation/classes/LTSpline.html similarity index 100% rename from GGJ2020/Assets/LeanTween/Documentation/classes/LTSpline.html rename to Assets/LeanTween/Documentation/classes/LTSpline.html diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LTSpline.html.meta b/Assets/LeanTween/Documentation/classes/LTSpline.html.meta similarity index 100% rename from GGJ2020/Assets/LeanTween/Documentation/classes/LTSpline.html.meta rename to Assets/LeanTween/Documentation/classes/LTSpline.html.meta diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LeanAudio.html b/Assets/LeanTween/Documentation/classes/LeanAudio.html similarity index 100% rename from GGJ2020/Assets/LeanTween/Documentation/classes/LeanAudio.html rename to Assets/LeanTween/Documentation/classes/LeanAudio.html diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LeanAudio.html.meta b/Assets/LeanTween/Documentation/classes/LeanAudio.html.meta similarity index 100% rename from GGJ2020/Assets/LeanTween/Documentation/classes/LeanAudio.html.meta rename to Assets/LeanTween/Documentation/classes/LeanAudio.html.meta diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LeanAudioOptions.html b/Assets/LeanTween/Documentation/classes/LeanAudioOptions.html similarity index 100% rename from GGJ2020/Assets/LeanTween/Documentation/classes/LeanAudioOptions.html rename to Assets/LeanTween/Documentation/classes/LeanAudioOptions.html diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LeanAudioOptions.html.meta b/Assets/LeanTween/Documentation/classes/LeanAudioOptions.html.meta similarity index 100% rename from GGJ2020/Assets/LeanTween/Documentation/classes/LeanAudioOptions.html.meta rename to Assets/LeanTween/Documentation/classes/LeanAudioOptions.html.meta diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LeanTween.html b/Assets/LeanTween/Documentation/classes/LeanTween.html similarity index 100% rename from GGJ2020/Assets/LeanTween/Documentation/classes/LeanTween.html rename to Assets/LeanTween/Documentation/classes/LeanTween.html diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LeanTween.html.meta b/Assets/LeanTween/Documentation/classes/LeanTween.html.meta similarity index 100% rename from GGJ2020/Assets/LeanTween/Documentation/classes/LeanTween.html.meta rename to Assets/LeanTween/Documentation/classes/LeanTween.html.meta diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LeanTweenType.html b/Assets/LeanTween/Documentation/classes/LeanTweenType.html similarity index 100% rename from GGJ2020/Assets/LeanTween/Documentation/classes/LeanTweenType.html rename to Assets/LeanTween/Documentation/classes/LeanTweenType.html diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/LeanTweenType.html.meta b/Assets/LeanTween/Documentation/classes/LeanTweenType.html.meta similarity index 100% rename from GGJ2020/Assets/LeanTween/Documentation/classes/LeanTweenType.html.meta rename to Assets/LeanTween/Documentation/classes/LeanTweenType.html.meta diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/index.html b/Assets/LeanTween/Documentation/classes/index.html similarity index 100% rename from GGJ2020/Assets/LeanTween/Documentation/classes/index.html rename to Assets/LeanTween/Documentation/classes/index.html diff --git a/GGJ2020/Assets/LeanTween/Documentation/classes/index.html.meta b/Assets/LeanTween/Documentation/classes/index.html.meta similarity index 100% rename from GGJ2020/Assets/LeanTween/Documentation/classes/index.html.meta rename to Assets/LeanTween/Documentation/classes/index.html.meta diff --git a/GGJ2020/Assets/LeanTween/Documentation/elements.meta b/Assets/LeanTween/Documentation/elements.meta similarity index 100% rename from GGJ2020/Assets/LeanTween/Documentation/elements.meta rename to Assets/LeanTween/Documentation/elements.meta diff --git a/GGJ2020/Assets/LeanTween/Documentation/elements/index.html b/Assets/LeanTween/Documentation/elements/index.html similarity index 100% rename from GGJ2020/Assets/LeanTween/Documentation/elements/index.html rename to Assets/LeanTween/Documentation/elements/index.html diff --git a/GGJ2020/Assets/LeanTween/Documentation/elements/index.html.meta b/Assets/LeanTween/Documentation/elements/index.html.meta similarity index 100% rename from GGJ2020/Assets/LeanTween/Documentation/elements/index.html.meta rename to Assets/LeanTween/Documentation/elements/index.html.meta diff --git a/GGJ2020/Assets/LeanTween/Documentation/index.html b/Assets/LeanTween/Documentation/index.html similarity index 100% rename from GGJ2020/Assets/LeanTween/Documentation/index.html rename to Assets/LeanTween/Documentation/index.html diff --git a/GGJ2020/Assets/LeanTween/Documentation/index.html.meta b/Assets/LeanTween/Documentation/index.html.meta similarity index 100% rename from GGJ2020/Assets/LeanTween/Documentation/index.html.meta rename to Assets/LeanTween/Documentation/index.html.meta diff --git a/GGJ2020/Assets/LeanTween/Editor.meta b/Assets/LeanTween/Editor.meta similarity index 100% rename from GGJ2020/Assets/LeanTween/Editor.meta rename to Assets/LeanTween/Editor.meta diff --git a/GGJ2020/Assets/LeanTween/Editor/LeanTweenDocumentationEditor.cs b/Assets/LeanTween/Editor/LeanTweenDocumentationEditor.cs similarity index 100% rename from GGJ2020/Assets/LeanTween/Editor/LeanTweenDocumentationEditor.cs rename to Assets/LeanTween/Editor/LeanTweenDocumentationEditor.cs diff --git a/GGJ2020/Assets/LeanTween/Editor/LeanTweenDocumentationEditor.cs.meta b/Assets/LeanTween/Editor/LeanTweenDocumentationEditor.cs.meta similarity index 100% rename from GGJ2020/Assets/LeanTween/Editor/LeanTweenDocumentationEditor.cs.meta rename to Assets/LeanTween/Editor/LeanTweenDocumentationEditor.cs.meta diff --git a/GGJ2020/Assets/LeanTween/License.txt b/Assets/LeanTween/License.txt similarity index 100% rename from GGJ2020/Assets/LeanTween/License.txt rename to Assets/LeanTween/License.txt diff --git a/GGJ2020/Assets/LeanTween/License.txt.meta b/Assets/LeanTween/License.txt.meta similarity index 100% rename from GGJ2020/Assets/LeanTween/License.txt.meta rename to Assets/LeanTween/License.txt.meta diff --git a/GGJ2020/Assets/LeanTween/ReadMe.txt b/Assets/LeanTween/ReadMe.txt similarity index 100% rename from GGJ2020/Assets/LeanTween/ReadMe.txt rename to Assets/LeanTween/ReadMe.txt diff --git a/GGJ2020/Assets/LeanTween/ReadMe.txt.meta b/Assets/LeanTween/ReadMe.txt.meta similarity index 100% rename from GGJ2020/Assets/LeanTween/ReadMe.txt.meta rename to Assets/LeanTween/ReadMe.txt.meta diff --git a/GGJ2020/Assets/Plugins/LeanTween.meta b/Assets/Plugins/LeanTween.meta similarity index 100% rename from GGJ2020/Assets/Plugins/LeanTween.meta rename to Assets/Plugins/LeanTween.meta diff --git a/GGJ2020/Assets/Plugins/LeanTween/LTDescr.cs b/Assets/Plugins/LeanTween/LTDescr.cs similarity index 100% rename from GGJ2020/Assets/Plugins/LeanTween/LTDescr.cs rename to Assets/Plugins/LeanTween/LTDescr.cs diff --git a/GGJ2020/Assets/Plugins/LeanTween/LTDescr.cs.meta b/Assets/Plugins/LeanTween/LTDescr.cs.meta similarity index 100% rename from GGJ2020/Assets/Plugins/LeanTween/LTDescr.cs.meta rename to Assets/Plugins/LeanTween/LTDescr.cs.meta diff --git a/GGJ2020/Assets/Plugins/LeanTween/LTDescrOptional.cs b/Assets/Plugins/LeanTween/LTDescrOptional.cs similarity index 100% rename from GGJ2020/Assets/Plugins/LeanTween/LTDescrOptional.cs rename to Assets/Plugins/LeanTween/LTDescrOptional.cs diff --git a/GGJ2020/Assets/Plugins/LeanTween/LTDescrOptional.cs.meta b/Assets/Plugins/LeanTween/LTDescrOptional.cs.meta similarity index 100% rename from GGJ2020/Assets/Plugins/LeanTween/LTDescrOptional.cs.meta rename to Assets/Plugins/LeanTween/LTDescrOptional.cs.meta diff --git a/GGJ2020/Assets/Plugins/LeanTween/LTSeq.cs b/Assets/Plugins/LeanTween/LTSeq.cs similarity index 100% rename from GGJ2020/Assets/Plugins/LeanTween/LTSeq.cs rename to Assets/Plugins/LeanTween/LTSeq.cs diff --git a/GGJ2020/Assets/Plugins/LeanTween/LTSeq.cs.meta b/Assets/Plugins/LeanTween/LTSeq.cs.meta similarity index 100% rename from GGJ2020/Assets/Plugins/LeanTween/LTSeq.cs.meta rename to Assets/Plugins/LeanTween/LTSeq.cs.meta diff --git a/GGJ2020/Assets/Plugins/LeanTween/LeanAudio.cs b/Assets/Plugins/LeanTween/LeanAudio.cs similarity index 100% rename from GGJ2020/Assets/Plugins/LeanTween/LeanAudio.cs rename to Assets/Plugins/LeanTween/LeanAudio.cs diff --git a/GGJ2020/Assets/Plugins/LeanTween/LeanAudio.cs.meta b/Assets/Plugins/LeanTween/LeanAudio.cs.meta similarity index 100% rename from GGJ2020/Assets/Plugins/LeanTween/LeanAudio.cs.meta rename to Assets/Plugins/LeanTween/LeanAudio.cs.meta diff --git a/GGJ2020/Assets/Plugins/LeanTween/LeanTest.cs b/Assets/Plugins/LeanTween/LeanTest.cs similarity index 100% rename from GGJ2020/Assets/Plugins/LeanTween/LeanTest.cs rename to Assets/Plugins/LeanTween/LeanTest.cs diff --git a/GGJ2020/Assets/Plugins/LeanTween/LeanTest.cs.meta b/Assets/Plugins/LeanTween/LeanTest.cs.meta similarity index 100% rename from GGJ2020/Assets/Plugins/LeanTween/LeanTest.cs.meta rename to Assets/Plugins/LeanTween/LeanTest.cs.meta diff --git a/GGJ2020/Assets/Plugins/LeanTween/LeanTween.cs b/Assets/Plugins/LeanTween/LeanTween.cs similarity index 100% rename from GGJ2020/Assets/Plugins/LeanTween/LeanTween.cs rename to Assets/Plugins/LeanTween/LeanTween.cs diff --git a/GGJ2020/Assets/Plugins/LeanTween/LeanTween.cs.meta b/Assets/Plugins/LeanTween/LeanTween.cs.meta similarity index 100% rename from GGJ2020/Assets/Plugins/LeanTween/LeanTween.cs.meta rename to Assets/Plugins/LeanTween/LeanTween.cs.meta diff --git a/GGJ2020/Assets/Plugins/LeanTween/LeanTween.dll.zip b/Assets/Plugins/LeanTween/LeanTween.dll.zip similarity index 100% rename from GGJ2020/Assets/Plugins/LeanTween/LeanTween.dll.zip rename to Assets/Plugins/LeanTween/LeanTween.dll.zip diff --git a/GGJ2020/Assets/Plugins/LeanTween/LeanTween.dll.zip.meta b/Assets/Plugins/LeanTween/LeanTween.dll.zip.meta similarity index 100% rename from GGJ2020/Assets/Plugins/LeanTween/LeanTween.dll.zip.meta rename to Assets/Plugins/LeanTween/LeanTween.dll.zip.meta diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity index 7cdec2a..0c4f74a 100644 --- a/Assets/Scenes/SampleScene.unity +++ b/Assets/Scenes/SampleScene.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 705507994} - m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} + m_IndirectSpecularColor: {r: 0.44657844, g: 0.49641222, b: 0.57481694, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -50,12 +50,11 @@ LightmapSettings: m_BounceScale: 1 m_IndirectOutputScale: 1 m_AlbedoBoost: 1 - m_TemporalCoherenceThreshold: 1 m_EnvironmentLightingMode: 0 m_EnableBakedLightmaps: 1 m_EnableRealtimeLightmaps: 1 m_LightmapEditorSettings: - serializedVersion: 10 + serializedVersion: 12 m_Resolution: 2 m_BakeResolution: 40 m_AtlasSize: 1024 @@ -63,6 +62,7 @@ LightmapSettings: m_AOMaxDistance: 1 m_CompAOExponent: 1 m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 m_Padding: 2 m_LightmapParameters: {fileID: 0} m_LightmapsBakeMode: 1 @@ -77,10 +77,16 @@ LightmapSettings: m_PVRDirectSampleCount: 32 m_PVRSampleCount: 500 m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 500 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 m_PVRFilterTypeDirect: 0 m_PVRFilterTypeIndirect: 0 m_PVRFilterTypeAO: 0 - m_PVRFilteringMode: 1 + m_PVREnvironmentMIS: 0 m_PVRCulling: 1 m_PVRFilteringGaussRadiusDirect: 1 m_PVRFilteringGaussRadiusIndirect: 5 @@ -88,7 +94,9 @@ LightmapSettings: m_PVRFilteringAtrousPositionSigmaDirect: 0.5 m_PVRFilteringAtrousPositionSigmaIndirect: 2 m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ShowResolutionOverlay: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 m_LightingDataAsset: {fileID: 0} m_UseShadowmask: 1 --- !u!196 &4 @@ -117,7 +125,8 @@ NavMeshSettings: GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 705507995} @@ -133,15 +142,18 @@ GameObject: Light: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 705507993} m_Enabled: 1 - serializedVersion: 8 + serializedVersion: 10 m_Type: 1 + m_Shape: 0 m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} m_Intensity: 1 m_Range: 10 m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 m_CookieSize: 10 m_Shadows: m_Type: 2 @@ -151,6 +163,24 @@ Light: m_Bias: 0.05 m_NormalBias: 0.4 m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 m_Cookie: {fileID: 0} m_DrawHalo: 0 m_Flare: {fileID: 0} @@ -158,19 +188,23 @@ Light: m_CullingMask: serializedVersion: 2 m_Bits: 4294967295 + m_RenderingLayerMask: 1 m_Lightmapping: 1 m_LightShadowCasterMode: 0 m_AreaSize: {x: 1, y: 1} m_BounceIntensity: 1 m_ColorTemperature: 6570 m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 m_ShadowRadius: 0 m_ShadowAngle: 0 --- !u!4 &705507995 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 705507993} m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} m_LocalPosition: {x: 0, y: 3, z: 0} @@ -183,7 +217,8 @@ Transform: GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 963194228} @@ -200,23 +235,26 @@ GameObject: AudioListener: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 963194225} m_Enabled: 1 --- !u!20 &963194227 Camera: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 963194225} m_Enabled: 1 serializedVersion: 2 m_ClearFlags: 1 m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 m_SensorSize: {x: 36, y: 24} m_LensShift: {x: 0, y: 0} - m_GateFitMode: 2 m_FocalLength: 50 m_NormalizedViewPortRect: serializedVersion: 2 @@ -248,12 +286,172 @@ Camera: Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 963194225} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 1, z: -10} + m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} + m_LocalPosition: {x: 0, y: 15.53, z: -1.4} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} +--- !u!1 &1451704393 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1451704396} + - component: {fileID: 1451704395} + - component: {fileID: 1451704394} + m_Layer: 0 + m_Name: Model + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!33 &1451704394 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1451704393} + m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &1451704395 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1451704393} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!4 &1451704396 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1451704393} + m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1975754340} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} +--- !u!1 &1975754334 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1975754340} + - component: {fileID: 1975754337} + - component: {fileID: 1975754336} + - component: {fileID: 1975754335} + m_Layer: 0 + m_Name: Capsule + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!143 &1975754335 +CharacterController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1975754334} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Height: 2 + m_Radius: 0.5 + m_SlopeLimit: 45 + m_StepOffset: 0.3 + m_SkinWidth: 0.08 + m_MinMoveDistance: 0.001 + m_Center: {x: 0, y: 0, z: 0} +--- !u!114 &1975754336 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1975754334} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8f7fbcfa6410c204e8977bb70e5ff84b, type: 3} + m_Name: + m_EditorClassIdentifier: + walkSpeed: 10 + model: {fileID: 1451704393} +--- !u!136 &1975754337 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1975754334} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + m_Radius: 0.5 + m_Height: 2 + m_Direction: 1 + m_Center: {x: 0, y: 0, z: 0} +--- !u!4 &1975754340 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1975754334} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -0.7251444, y: 1.8377934, z: -0.25297546} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1451704396} + m_Father: {fileID: 0} + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/GGJ2020/Assets/Scripts/PlayerController.cs b/Assets/Scripts/Input/PlayerController.cs similarity index 100% rename from GGJ2020/Assets/Scripts/PlayerController.cs rename to Assets/Scripts/Input/PlayerController.cs diff --git a/GGJ2020/Assets/Scripts/PlayerController.cs.meta b/Assets/Scripts/Input/PlayerController.cs.meta similarity index 100% rename from GGJ2020/Assets/Scripts/PlayerController.cs.meta rename to Assets/Scripts/Input/PlayerController.cs.meta diff --git a/GGJ2020/Assets/LeanTween.meta b/GGJ2020/Assets/LeanTween.meta deleted file mode 100644 index 0bc313d..0000000 --- a/GGJ2020/Assets/LeanTween.meta +++ /dev/null @@ -1,2 +0,0 @@ -fileFormatVersion: 2 -guid: 5e6a0fa47acf54892bbdae89028eaec3 diff --git a/GGJ2020/Assets/Plugins.meta b/GGJ2020/Assets/Plugins.meta deleted file mode 100644 index d67927c..0000000 --- a/GGJ2020/Assets/Plugins.meta +++ /dev/null @@ -1,2 +0,0 @@ -fileFormatVersion: 2 -guid: 1839327a1a81c4d979f53b07027ab4b9 diff --git a/GGJ2020/Assets/Scenes.meta b/GGJ2020/Assets/Scenes.meta deleted file mode 100644 index cd10b69..0000000 --- a/GGJ2020/Assets/Scenes.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 05a69edb64a15cf4bbaa7407f6318121 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/GGJ2020/Assets/Scenes/SampleScene.unity b/GGJ2020/Assets/Scenes/SampleScene.unity deleted file mode 100644 index 0c4f74a..0000000 --- a/GGJ2020/Assets/Scenes/SampleScene.unity +++ /dev/null @@ -1,457 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -OcclusionCullingSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: 0.25 - backfaceThreshold: 100 - m_SceneGUID: 00000000000000000000000000000000 - m_OcclusionCullingData: {fileID: 0} ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 9 - m_Fog: 0 - m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - m_FogMode: 3 - m_FogDensity: 0.01 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} - m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} - m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 0 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} - m_HaloStrength: 0.5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 0 - m_DefaultReflectionResolution: 128 - m_ReflectionBounces: 1 - m_ReflectionIntensity: 1 - m_CustomReflection: {fileID: 0} - m_Sun: {fileID: 705507994} - m_IndirectSpecularColor: {r: 0.44657844, g: 0.49641222, b: 0.57481694, a: 1} - m_UseRadianceAmbientProbe: 0 ---- !u!157 &3 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 11 - m_GIWorkflowMode: 0 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 1 - m_LightmapEditorSettings: - serializedVersion: 12 - m_Resolution: 2 - m_BakeResolution: 40 - m_AtlasSize: 1024 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 1 - m_CompAOExponentDirect: 0 - m_ExtractAmbientOcclusion: 0 - m_Padding: 2 - m_LightmapParameters: {fileID: 0} - m_LightmapsBakeMode: 1 - m_TextureCompression: 1 - m_FinalGather: 0 - m_FinalGatherFiltering: 1 - m_FinalGatherRayCount: 256 - m_ReflectionCompression: 2 - m_MixedBakeMode: 2 - m_BakeBackend: 1 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 500 - m_PVRBounces: 2 - m_PVREnvironmentSampleCount: 500 - m_PVREnvironmentReferencePointCount: 2048 - m_PVRFilteringMode: 2 - m_PVRDenoiserTypeDirect: 0 - m_PVRDenoiserTypeIndirect: 0 - m_PVRDenoiserTypeAO: 0 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVREnvironmentMIS: 0 - m_PVRCulling: 1 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ExportTrainingData: 0 - m_TrainingDataDestination: TrainingData - m_LightProbeSampleCountMultiplier: 4 - m_LightingDataAsset: {fileID: 0} - m_UseShadowmask: 1 ---- !u!196 &4 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 2 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.4 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666667 - manualTileSize: 0 - tileSize: 256 - accuratePlacement: 0 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} ---- !u!1 &705507993 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 705507995} - - component: {fileID: 705507994} - m_Layer: 0 - m_Name: Directional Light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!108 &705507994 -Light: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 705507993} - m_Enabled: 1 - serializedVersion: 10 - m_Type: 1 - m_Shape: 0 - m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} - m_Intensity: 1 - m_Range: 10 - m_SpotAngle: 30 - m_InnerSpotAngle: 21.80208 - m_CookieSize: 10 - m_Shadows: - m_Type: 2 - m_Resolution: -1 - m_CustomResolution: -1 - m_Strength: 1 - m_Bias: 0.05 - m_NormalBias: 0.4 - m_NearPlane: 0.2 - m_CullingMatrixOverride: - e00: 1 - e01: 0 - e02: 0 - e03: 0 - e10: 0 - e11: 1 - e12: 0 - e13: 0 - e20: 0 - e21: 0 - e22: 1 - e23: 0 - e30: 0 - e31: 0 - e32: 0 - e33: 1 - m_UseCullingMatrixOverride: 0 - m_Cookie: {fileID: 0} - m_DrawHalo: 0 - m_Flare: {fileID: 0} - m_RenderMode: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingLayerMask: 1 - m_Lightmapping: 1 - m_LightShadowCasterMode: 0 - m_AreaSize: {x: 1, y: 1} - m_BounceIntensity: 1 - m_ColorTemperature: 6570 - m_UseColorTemperature: 0 - m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} - m_UseBoundingSphereOverride: 0 - m_ShadowRadius: 0 - m_ShadowAngle: 0 ---- !u!4 &705507995 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 705507993} - m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} - m_LocalPosition: {x: 0, y: 3, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} ---- !u!1 &963194225 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 963194228} - - component: {fileID: 963194227} - - component: {fileID: 963194226} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &963194226 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 963194225} - m_Enabled: 1 ---- !u!20 &963194227 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 963194225} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} - m_projectionMatrixMode: 1 - m_GateFitMode: 2 - m_FOVAxisMode: 0 - m_SensorSize: {x: 36, y: 24} - m_LensShift: {x: 0, y: 0} - m_FocalLength: 50 - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 1000 - field of view: 60 - orthographic: 0 - orthographic size: 5 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 1 - m_AllowMSAA: 1 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &963194228 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 963194225} - m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} - m_LocalPosition: {x: 0, y: 15.53, z: -1.4} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} ---- !u!1 &1451704393 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1451704396} - - component: {fileID: 1451704395} - - component: {fileID: 1451704394} - m_Layer: 0 - m_Name: Model - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!33 &1451704394 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1451704393} - m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} ---- !u!23 &1451704395 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1451704393} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!4 &1451704396 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1451704393} - m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 1975754340} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} ---- !u!1 &1975754334 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1975754340} - - component: {fileID: 1975754337} - - component: {fileID: 1975754336} - - component: {fileID: 1975754335} - m_Layer: 0 - m_Name: Capsule - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!143 &1975754335 -CharacterController: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1975754334} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Height: 2 - m_Radius: 0.5 - m_SlopeLimit: 45 - m_StepOffset: 0.3 - m_SkinWidth: 0.08 - m_MinMoveDistance: 0.001 - m_Center: {x: 0, y: 0, z: 0} ---- !u!114 &1975754336 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1975754334} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8f7fbcfa6410c204e8977bb70e5ff84b, type: 3} - m_Name: - m_EditorClassIdentifier: - walkSpeed: 10 - model: {fileID: 1451704393} ---- !u!136 &1975754337 -CapsuleCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1975754334} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - m_Radius: 0.5 - m_Height: 2 - m_Direction: 1 - m_Center: {x: 0, y: 0, z: 0} ---- !u!4 &1975754340 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1975754334} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0.7251444, y: 1.8377934, z: -0.25297546} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 1451704396} - m_Father: {fileID: 0} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/GGJ2020/Assets/Scenes/SampleScene.unity.meta b/GGJ2020/Assets/Scenes/SampleScene.unity.meta deleted file mode 100644 index 952bd1e..0000000 --- a/GGJ2020/Assets/Scenes/SampleScene.unity.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 9fc0d4010bbf28b4594072e72b8655ab -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/GGJ2020/Assets/Scripts.meta b/GGJ2020/Assets/Scripts.meta deleted file mode 100644 index fbf67ab..0000000 --- a/GGJ2020/Assets/Scripts.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 27509ad3d41769745ab66d33159d98b9 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/GGJ2020/Logs/Packages-Update.log b/GGJ2020/Logs/Packages-Update.log deleted file mode 100644 index dc71288..0000000 --- a/GGJ2020/Logs/Packages-Update.log +++ /dev/null @@ -1,45 +0,0 @@ - -=== Sat Feb 1 10:36:26 2020 - -Packages were changed. -Update Mode: resetToDefaultDependencies - -The following packages were added: - com.unity.textmeshpro@2.0.1 - com.unity.collab-proxy@1.2.16 - com.unity.test-framework@1.1.9 - com.unity.timeline@1.2.10 - com.unity.ide.vscode@1.1.4 - com.unity.ide.rider@1.1.4 - com.unity.ugui@1.0.0 - com.unity.modules.ai@1.0.0 - com.unity.modules.animation@1.0.0 - com.unity.modules.androidjni@1.0.0 - com.unity.modules.assetbundle@1.0.0 - com.unity.modules.audio@1.0.0 - com.unity.modules.cloth@1.0.0 - com.unity.modules.director@1.0.0 - com.unity.modules.imageconversion@1.0.0 - com.unity.modules.imgui@1.0.0 - com.unity.modules.jsonserialize@1.0.0 - com.unity.modules.particlesystem@1.0.0 - com.unity.modules.physics@1.0.0 - com.unity.modules.physics2d@1.0.0 - com.unity.modules.screencapture@1.0.0 - com.unity.modules.terrain@1.0.0 - com.unity.modules.terrainphysics@1.0.0 - com.unity.modules.tilemap@1.0.0 - com.unity.modules.ui@1.0.0 - com.unity.modules.uielements@1.0.0 - com.unity.modules.umbra@1.0.0 - com.unity.modules.unityanalytics@1.0.0 - com.unity.modules.unitywebrequest@1.0.0 - com.unity.modules.unitywebrequestassetbundle@1.0.0 - com.unity.modules.unitywebrequestaudio@1.0.0 - com.unity.modules.unitywebrequesttexture@1.0.0 - com.unity.modules.unitywebrequestwww@1.0.0 - com.unity.modules.vehicles@1.0.0 - com.unity.modules.video@1.0.0 - com.unity.modules.vr@1.0.0 - com.unity.modules.wind@1.0.0 - com.unity.modules.xr@1.0.0 diff --git a/GGJ2020/Packages/manifest.json b/GGJ2020/Packages/manifest.json deleted file mode 100644 index 39e66d1..0000000 --- a/GGJ2020/Packages/manifest.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "dependencies": { - "com.unity.collab-proxy": "1.2.16", - "com.unity.ide.rider": "1.1.4", - "com.unity.ide.vscode": "1.1.4", - "com.unity.test-framework": "1.1.9", - "com.unity.textmeshpro": "2.0.1", - "com.unity.timeline": "1.2.10", - "com.unity.ugui": "1.0.0", - "com.unity.modules.ai": "1.0.0", - "com.unity.modules.androidjni": "1.0.0", - "com.unity.modules.animation": "1.0.0", - "com.unity.modules.assetbundle": "1.0.0", - "com.unity.modules.audio": "1.0.0", - "com.unity.modules.cloth": "1.0.0", - "com.unity.modules.director": "1.0.0", - "com.unity.modules.imageconversion": "1.0.0", - "com.unity.modules.imgui": "1.0.0", - "com.unity.modules.jsonserialize": "1.0.0", - "com.unity.modules.particlesystem": "1.0.0", - "com.unity.modules.physics": "1.0.0", - "com.unity.modules.physics2d": "1.0.0", - "com.unity.modules.screencapture": "1.0.0", - "com.unity.modules.terrain": "1.0.0", - "com.unity.modules.terrainphysics": "1.0.0", - "com.unity.modules.tilemap": "1.0.0", - "com.unity.modules.ui": "1.0.0", - "com.unity.modules.uielements": "1.0.0", - "com.unity.modules.umbra": "1.0.0", - "com.unity.modules.unityanalytics": "1.0.0", - "com.unity.modules.unitywebrequest": "1.0.0", - "com.unity.modules.unitywebrequestassetbundle": "1.0.0", - "com.unity.modules.unitywebrequestaudio": "1.0.0", - "com.unity.modules.unitywebrequesttexture": "1.0.0", - "com.unity.modules.unitywebrequestwww": "1.0.0", - "com.unity.modules.vehicles": "1.0.0", - "com.unity.modules.video": "1.0.0", - "com.unity.modules.vr": "1.0.0", - "com.unity.modules.wind": "1.0.0", - "com.unity.modules.xr": "1.0.0" - } -} diff --git a/GGJ2020/ProjectSettings/XRSettings.asset b/GGJ2020/ProjectSettings/XRSettings.asset deleted file mode 100644 index bfefb85..0000000 --- a/GGJ2020/ProjectSettings/XRSettings.asset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:edd2beb4a2e388312b4b7da241aa51070434005d82c59363f1237dd2e567585f -size 158