This commit is contained in:
Diego Ezequiel Guillén 2017-02-21 22:48:43 -03:00
Коммит 3fdb83a11f
74 изменённых файлов: 2222 добавлений и 0 удалений

35
.gitignore поставляемый Normal file
Просмотреть файл

@ -0,0 +1,35 @@
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/Assets/AssetStoreTools*
# Visual Studio 2015 cache directory
/.vs/
# Autogenerated VS/MD/Consulo solution and project files
ExportedObj/
.consulo/
*.csproj
*.unityproj
*.sln
*.suo
*.tmp
*.user
*.userprefs
*.pidb
*.booproj
*.svd
*.pdb
# Unity3D generated meta files
*.pidb.meta
# Unity3D Generated File On Crash Reports
sysinfo.txt
# Builds
*.apk
*.unitypackage

9
Assets/Prefabs.meta Normal file
Просмотреть файл

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 089aa80b216c148c9b30f02ebb42d1bf
folderAsset: yes
timeCreated: 1487721903
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

Двоичные данные
Assets/Prefabs/PickUp.prefab Normal file

Двоичный файл не отображается.

Просмотреть файл

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f55bc383147264d2a9bd671e33b625f8
timeCreated: 1487721867
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

9
Assets/Scenes.meta Normal file
Просмотреть файл

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 404996c1f564d49359c4a0687a3005b8
folderAsset: yes
timeCreated: 1486220523
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

Двоичные данные
Assets/Scenes/Main.unity Normal file

Двоичный файл не отображается.

Просмотреть файл

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b67829a277c5d4494bd6ebb3e7ed3d55
timeCreated: 1486220523
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

9
Assets/Scripts.meta Normal file
Просмотреть файл

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 4ca6c895f7ac84a0f829b47f27f5b8f6
folderAsset: yes
timeCreated: 1486222180
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

Просмотреть файл

@ -0,0 +1,23 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CameraController : MonoBehaviour {
public GameObject player;
private Vector3 offset;
// Use this for initialization
void Start ()
{
offset = transform.position - player.transform.position;
}
// Update is called once per frame
void LateUpdate ()
{
transform.position = player.transform.position + offset;
}
}

Просмотреть файл

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 5d9fce64c21b24a36a07053c06c90dbc
timeCreated: 1486307978
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

Просмотреть файл

@ -0,0 +1,50 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class PlayerController : MonoBehaviour {
public float speed;
public Text countText;
public Text winText;
private Rigidbody2D rb2d;
private int count;
void Start ()
{
rb2d = GetComponent<Rigidbody2D> ();
count = 0;
winText.text = "";
SetCountText ();
}
void FixedUpdate ()
{
float moveHorizontal = Input.GetAxis("Horizontal");
float moveVertical = Input.GetAxis("Vertical");
Vector2 movement = new Vector2 (moveHorizontal, moveVertical);
rb2d.AddForce (movement * speed);
}
void OnTriggerEnter2D(Collider2D other)
{
if (other.gameObject.CompareTag ("PickUp"))
{
other.gameObject.SetActive (false);
count = count + 1;
SetCountText ();
}
}
void SetCountText()
{
countText.text = "Count: " + count.ToString ();
if (count >= 12)
{
winText.text = "You win!";
}
}
}

Просмотреть файл

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 23d4a3c40f242419f9ec63986ca9d0b5
timeCreated: 1486222119
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

11
Assets/Scripts/Rotator.cs Normal file
Просмотреть файл

@ -0,0 +1,11 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Rotator : MonoBehaviour {
void Update ()
{
transform.Rotate (new Vector3 (0, 0, 45) * Time.deltaTime);
}
}

Просмотреть файл

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: bb8fa486c7e9b4c8ebc9714d3a4bf764
timeCreated: 1486309008
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

9
Assets/Sprites.meta Normal file
Просмотреть файл

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: a07e9858f6806e4478a413f8a66a451c
folderAsset: yes
timeCreated: 1444751603
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

Двоичные данные
Assets/Sprites/Background.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 690 KiB

Просмотреть файл

@ -0,0 +1,56 @@
fileFormatVersion: 2
guid: 8357b840f0c40b444b51cc76056d1765
timeCreated: 1444751551
licenseType: Store
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 1
linearTexture: 0
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 8
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -1
maxTextureSize: 2048
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 8
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

Двоичные данные
Assets/Sprites/Pickup.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 36 KiB

Просмотреть файл

@ -0,0 +1,56 @@
fileFormatVersion: 2
guid: 17efed9239502c04996f6e9d0078a97f
timeCreated: 1444751549
licenseType: Store
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 1
linearTexture: 0
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 8
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -1
maxTextureSize: 2048
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 8
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

Двоичные данные
Assets/Sprites/UFO.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 139 KiB

Просмотреть файл

@ -0,0 +1,56 @@
fileFormatVersion: 2
guid: c4b2e2c9f19dd1e43b1f413c0c8b3076
timeCreated: 1444751551
licenseType: Store
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 1
linearTexture: 0
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 8
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -1
maxTextureSize: 2048
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 8
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

9
Assets/TutorialInfo.meta Normal file
Просмотреть файл

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 49110bb8dcada46328ad741970bce702
folderAsset: yes
timeCreated: 1475590612
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

Просмотреть файл

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: f6d5957b691564d38b1f30ffd7c56263
folderAsset: yes
timeCreated: 1475835163
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

Просмотреть файл

@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Просмотреть файл

@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: b8784b247b090471695b945937cf5a6b
TextScriptImporter:
userData:

Двоичные данные
Assets/TutorialInfo/Fonts/Roboto-Thin.ttf Normal file

Двоичный файл не отображается.

Просмотреть файл

@ -0,0 +1,20 @@
fileFormatVersion: 2
guid: 826c6ae75667a440f8d925b3ff94a03f
timeCreated: 1475687632
licenseType: Store
TrueTypeFontImporter:
serializedVersion: 4
fontSize: 16
forceTextureCase: -2
characterSpacing: 0
characterPadding: 1
includeFontData: 1
fontNames:
- Roboto
fallbackFontReferences: []
customCharacters:
fontRenderingMode: 0
ascentCalculationMode: 1
userData:
assetBundleName:
assetBundleVariant:

Двоичные данные
Assets/TutorialInfo/Fonts/RobotoCondensed-Bold.ttf Normal file

Двоичный файл не отображается.

Просмотреть файл

@ -0,0 +1,20 @@
fileFormatVersion: 2
guid: b20f139c373fa4555a05cdd0036dfa44
timeCreated: 1475687636
licenseType: Store
TrueTypeFontImporter:
serializedVersion: 4
fontSize: 16
forceTextureCase: -2
characterSpacing: 0
characterPadding: 1
includeFontData: 1
fontNames:
- Roboto Condensed
fallbackFontReferences: []
customCharacters:
fontRenderingMode: 0
ascentCalculationMode: 1
userData:
assetBundleName:
assetBundleVariant:

Просмотреть файл

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 5a9bcd70e6a4b4b05badaa72e827d8e0
folderAsset: yes
timeCreated: 1475835190
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

Просмотреть файл

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 3ad9b87dffba344c89909c6d1b1c17e1
folderAsset: yes
timeCreated: 1475593892
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

Просмотреть файл

@ -0,0 +1,27 @@
using UnityEngine;
using UnityEditor;
using System.Collections;
[CustomEditor(typeof(TutorialInfo))]
public class TutorialInfoEditor : Editor
{
void OnEnable()
{
if (PlayerPrefs.HasKey(TutorialInfo.showAtStartPrefsKey))
{
((TutorialInfo)target).showAtStart = PlayerPrefs.GetInt(TutorialInfo.showAtStartPrefsKey) == 1;
}
}
public override void OnInspectorGUI()
{
EditorGUI.BeginChangeCheck ();
base.OnInspectorGUI ();
if (EditorGUI.EndChangeCheck ())
{
PlayerPrefs.SetInt(TutorialInfo.showAtStartPrefsKey, ((TutorialInfo)target).showAtStart ? 1 : 0);
}
}
}

Просмотреть файл

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 888a42c461eac43e7a22504fedd11a27
timeCreated: 1475687478
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

Просмотреть файл

@ -0,0 +1,82 @@
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
// Hi! This script presents the overlay info for our tutorial content, linking you back to the relevant page.
public class TutorialInfo : MonoBehaviour
{
// allow user to choose whether to show this menu
public bool showAtStart = true;
// location that Visit Tutorial button sends the user
public string url;
// store the GameObject which renders the overlay info
public GameObject overlay;
// store a reference to the audio listener in the scene, allowing for muting of the scene during the overlay
public AudioListener mainListener;
// store a reference to the UI toggle which allows users to switch it off for future plays
public Toggle showAtStartToggle;
// string to store Prefs Key with name of preference for showing the overlay info
public static string showAtStartPrefsKey = "showLaunchScreen";
void Awake()
{
// Check player prefs for show at start preference
if (PlayerPrefs.HasKey(showAtStartPrefsKey))
{
showAtStart = PlayerPrefs.GetInt(showAtStartPrefsKey) == 1;
}
// set UI toggle to match the existing UI preference
showAtStartToggle.isOn = showAtStart;
// show the overlay info or continue to play the game
if (showAtStart)
{
ShowLaunchScreen();
}
else
{
StartGame ();
}
}
// show overlay info, pausing game time, disabling the audio listener
// and enabling the overlay info parent game object
public void ShowLaunchScreen()
{
Time.timeScale = 0f;
mainListener.enabled = false;
overlay.SetActive (true);
}
// open the stored URL for this content in a web browser
public void LaunchTutorial()
{
Application.OpenURL (url);
}
// continue to play, by ensuring the preference is set correctly, the overlay is not active,
// and that the audio listener is enabled, and time scale is 1 (normal)
public void StartGame()
{
overlay.SetActive (false);
mainListener.enabled = true;
Time.timeScale = 1f;
}
// set the boolean storing show at start status to equal the UI toggle's status
public void ToggleShowAtLaunch()
{
showAtStart = showAtStartToggle.isOn;
PlayerPrefs.SetInt(showAtStartPrefsKey, showAtStart ? 1 : 0);
}
}

Просмотреть файл

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 7fc8f85e562a44b19a9186c14134b9d9
timeCreated: 1475687478
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

Просмотреть файл

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 62c78ccd75c204d37aabb46c2d1c3952
folderAsset: yes
timeCreated: 1475835175
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

Двоичные данные
Assets/TutorialInfo/Sprites/unity-logo.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 9.2 KiB

Просмотреть файл

@ -0,0 +1,59 @@
fileFormatVersion: 2
guid: fa8fa8572a0ff4c66af7beb04f2ff3f0
timeCreated: 1475687721
licenseType: Store
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 1
linearTexture: 0
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 7
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -1
maxTextureSize: 2048
textureSettings:
filterMode: -1
aniso: 16
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
buildTargetSettings: []
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c74f553b118f94bfcbe70a5cdcc48114
timeCreated: 1475590618
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

Двоичные данные
Assets/_Complete-Game.unity Normal file

Двоичный файл не отображается.

Просмотреть файл

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8ef96a4efb4af44b4808c38e6e8c6edc
timeCreated: 1475838056
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

Просмотреть файл

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: a16dbc2530f57e5439f643bb9749ae72
folderAsset: yes
timeCreated: 1444751617
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

Просмотреть файл

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 86c64863e8bad9446aa0ef3993124451
folderAsset: yes
timeCreated: 1444751779
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

Двоичные данные
Assets/_Completed-Assets/Prefabs/Pickup (Completed).prefab Normal file

Двоичный файл не отображается.

Просмотреть файл

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a02cd56951325b645973551f0bae4cc0
timeCreated: 1448907076
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

Просмотреть файл

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 4c23de5cb4d953e4695d48e687574334
folderAsset: yes
timeCreated: 1444751772
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

Двоичные данные
Assets/_Completed-Assets/Scenes/Main (Completed).unity Normal file

Двоичный файл не отображается.

Просмотреть файл

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8fef1c5ea5fe2e845a387006d3eed277
timeCreated: 1444752488
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

Просмотреть файл

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 2433445a45984634b90f27905a43a91d
folderAsset: yes
timeCreated: 1444751766
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

Просмотреть файл

@ -0,0 +1,24 @@
using UnityEngine;
using System.Collections;
public class CompleteCameraController : MonoBehaviour {
public GameObject player; //Public variable to store a reference to the player game object
private Vector3 offset; //Private variable to store the offset distance between the player and camera
// Use this for initialization
void Start ()
{
//Calculate and store the offset value by getting the distance between the player's position and camera's position.
offset = transform.position - player.transform.position;
}
// LateUpdate is called after Update each frame
void LateUpdate ()
{
// Set the position of the camera's transform to be the same as the player's, but offset by the calculated offset distance.
transform.position = player.transform.position + offset;
}
}

Просмотреть файл

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 12f0aa6f1b5c72347ad48fb231753b34
timeCreated: 1448904228
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

Просмотреть файл

@ -0,0 +1,78 @@
using UnityEngine;
using System.Collections;
//Adding this allows us to access members of the UI namespace including Text.
using UnityEngine.UI;
public class CompletePlayerController : MonoBehaviour {
public float speed; //Floating point variable to store the player's movement speed.
public Text countText; //Store a reference to the UI Text component which will display the number of pickups collected.
public Text winText; //Store a reference to the UI Text component which will display the 'You win' message.
private Rigidbody2D rb2d; //Store a reference to the Rigidbody2D component required to use 2D Physics.
private int count; //Integer to store the number of pickups collected so far.
// Use this for initialization
void Start()
{
//Get and store a reference to the Rigidbody2D component so that we can access it.
rb2d = GetComponent<Rigidbody2D> ();
//Initialize count to zero.
count = 0;
//Initialze winText to a blank string since we haven't won yet at beginning.
winText.text = "";
//Call our SetCountText function which will update the text with the current value for count.
SetCountText ();
}
//FixedUpdate is called at a fixed interval and is independent of frame rate. Put physics code here.
void FixedUpdate()
{
//Store the current horizontal input in the float moveHorizontal.
float moveHorizontal = Input.GetAxis ("Horizontal");
//Store the current vertical input in the float moveVertical.
float moveVertical = Input.GetAxis ("Vertical");
//Use the two store floats to create a new Vector2 variable movement.
Vector2 movement = new Vector2 (moveHorizontal, moveVertical);
//Call the AddForce function of our Rigidbody2D rb2d supplying movement multiplied by speed to move our player.
rb2d.AddForce (movement * speed);
}
//OnTriggerEnter2D is called whenever this object overlaps with a trigger collider.
void OnTriggerEnter2D(Collider2D other)
{
//Check the provided Collider2D parameter other to see if it is tagged "PickUp", if it is...
if (other.gameObject.CompareTag ("PickUp"))
{
//... then set the other object we just collided with to inactive.
other.gameObject.SetActive(false);
//Add one to the current value of our count variable.
count = count + 1;
//Update the currently displayed count by calling the SetCountText function.
SetCountText ();
}
}
//This function updates the text displaying the number of objects we've collected and displays our victory message if we've collected all of them.
void SetCountText()
{
//Set the text property of our our countText object to "Count: " followed by the number stored in our count variable.
countText.text = "Count: " + count.ToString ();
//Check if we've collected all 12 pickups. If we have...
if (count >= 12)
//... then set the text property of our winText object to "You win!"
winText.text = "You win!";
}
}

Просмотреть файл

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: cbfaa6c26fe6ae5469a4865cbd27e471
timeCreated: 1444842164
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

Просмотреть файл

@ -0,0 +1,12 @@
using UnityEngine;
using System.Collections;
public class CompleteRotator : MonoBehaviour {
//Update is called every frame
void Update ()
{
//Rotate thet transform of the game object this is attached to by 45 degrees, taking into account the time elapsed since last frame.
transform.Rotate (new Vector3 (0, 0, 45) * Time.deltaTime);
}
}

Просмотреть файл

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 755363d2f78ba824cba45a1ef8cf4294
timeCreated: 1448906025
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

Двоичные данные
ProjectSettings/AudioManager.asset Normal file

Двоичный файл не отображается.

Двоичные данные
ProjectSettings/ClusterInputManager.asset Normal file

Двоичный файл не отображается.

Двоичные данные
ProjectSettings/DynamicsManager.asset Normal file

Двоичный файл не отображается.

Двоичные данные
ProjectSettings/EditorBuildSettings.asset Normal file

Двоичный файл не отображается.

Двоичные данные
ProjectSettings/EditorSettings.asset Normal file

Двоичный файл не отображается.

Двоичные данные
ProjectSettings/GraphicsSettings.asset Normal file

Двоичный файл не отображается.

Двоичные данные
ProjectSettings/InputManager.asset Normal file

Двоичный файл не отображается.

Двоичные данные
ProjectSettings/NavMeshAreas.asset Normal file

Двоичный файл не отображается.

Двоичные данные
ProjectSettings/NetworkManager.asset Normal file

Двоичный файл не отображается.

Двоичные данные
ProjectSettings/Physics2DSettings.asset Normal file

Двоичный файл не отображается.

Двоичные данные
ProjectSettings/ProjectSettings.asset Normal file

Двоичный файл не отображается.

Просмотреть файл

@ -0,0 +1 @@
m_EditorVersion: 5.5.0f3

Двоичные данные
ProjectSettings/QualitySettings.asset Normal file

Двоичный файл не отображается.

Двоичные данные
ProjectSettings/TagManager.asset Normal file

Двоичный файл не отображается.

Двоичные данные
ProjectSettings/TimeManager.asset Normal file

Двоичный файл не отображается.

Двоичные данные
ProjectSettings/UnityAdsSettings.asset Normal file

Двоичный файл не отображается.

Просмотреть файл

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 00000000000000008100000000000000

Двоичные данные
ProjectSettings/UnityConnectSettings.asset Normal file

Двоичный файл не отображается.