Commit d52bb22d authored by Bruno Meyer's avatar Bruno Meyer 😢

bolinha que pula

parent cece82cf
Pipeline #6077 skipped

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{b955b5aa-9c1c-4cd6-9a10-9e34431be3eb}") = "Assembly-UnityScript", "Assembly-UnityScript.unityproj", "{4C763FBC-E0E2-0CE2-352C-2866024DD196}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4C763FBC-E0E2-0CE2-352C-2866024DD196}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4C763FBC-E0E2-0CE2-352C-2866024DD196}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4C763FBC-E0E2-0CE2-352C-2866024DD196}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4C763FBC-E0E2-0CE2-352C-2866024DD196}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = Assembly-UnityScript.unityproj
EndGlobalSection
EndGlobal
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>10.0.20506</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<RootNamespace></RootNamespace>
<ProjectGuid>{4C763FBC-E0E2-0CE2-352C-2866024DD196}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<AssemblyName>Assembly-UnityScript</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<BaseDirectory>Assets</BaseDirectory>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Temp\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_3_4;UNITY_5_3;UNITY_5;UNITY_64;ENABLE_NEW_BUGREPORTER;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_SPRITE_POLYGON;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;INCLUDE_DIRECTX12;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;ENABLE_LOCALIZATION;ENABLE_ANDROID_ATLAS_ETC1_COMPRESSION;ENABLE_EDITOR_TESTS_RUNNER;UNITY_STANDALONE_LINUX;UNITY_STANDALONE;UNITY_STANDALONE_LINUX_API;ENABLE_SUBSTANCE;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLUSTERINPUT;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;ENABLE_PROFILER;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_LINUX</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoWarn>0169</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>Temp\bin\Release\</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoWarn>0169</NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.XML" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="UnityEngine">
<HintPath>/opt/Unity/Editor/Data/Managed/UnityEngine.dll</HintPath>
</Reference>
<Reference Include="UnityEditor">
<HintPath>/opt/Unity/Editor/Data/Managed/UnityEditor.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Assets\bolinha.js" />
<Compile Include="Assets\segueMouse.js" />
<Reference Include="UnityEngine.UI">
<HintPath>/opt/Unity/Editor/Data/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.Networking">
<HintPath>/opt/Unity/Editor/Data/UnityExtensions/Unity/Networking/UnityEngine.Networking.dll</HintPath>
</Reference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
<Properties>
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" PreferredExecutionTarget="MonoDevelop.Default" />
<MonoDevelop.Ide.Workbench ActiveDocument="Assets\bolinha.js">
<Files>
<File FileName="Assets\segueMouse.js" Line="7" Column="4" />
<File FileName="Assets\bolinha.js" Line="25" Column="21" />
</Files>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.DebuggingService.Breakpoints>
<BreakpointStore />
</MonoDevelop.Ide.DebuggingService.Breakpoints>
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
</Properties>
\ No newline at end of file
#pragma strict
//var sobe : boolean;
var cuboPrincipal :GameObject;
var velocidadeX : float;
var velocidadeZ : float;
function Start () {
velocidadeX = 1;
velocidadeZ = 1.5;
//sobe=true;
transform.GetComponent.<Renderer>().material.color = Color.black;
}
function Update () {
transform.position.x += velocidadeX * Time.deltaTime;
transform.position.z += velocidadeZ * Time.deltaTime;
velocidadeZ -= 1.5*Time.deltaTime;
var aux = detectaColisao();
if(aux>0){
velocidadeZ = 1.5;
if(aux == 1)
velocidadeX+=0.5;
}
}
function detectaColisao(){
var a : Vector2 = Vector2( transform.position.x, transform.position.z );
var b : Vector2 = Vector2( cuboPrincipal.transform.position.x, cuboPrincipal.transform.position.z ) ;
var distancia : float = Vector2.Distance( a,b );
var h1 = Mathf.Sqrt( transform.localScale.x*transform.localScale.x/4 + transform.localScale.y*transform.localScale.y/4 );
var h2 = Mathf.Sqrt( cuboPrincipal.transform.localScale.x*cuboPrincipal.transform.localScale.x/4 + cuboPrincipal.transform.localScale.y*cuboPrincipal.transform.localScale.y/4 );
if(distancia < (h1+h2) ){
var distX = transform.position.x - cuboPrincipal.transform.position.x;
if(distX < 0)
distX = -distX;
distX -= (transform.localScale.x + cuboPrincipal.transform.localScale.x)/2;
distX = -distX;
if( distX <= 0.1*transform.localScale.x/2 )
return 1;
else
return 2;
}
else
return 0;
}
\ No newline at end of file
fileFormatVersion: 2
guid: ab78091eabc574cdd98672f8f4c5f490
timeCreated: 1465220216
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
#pragma strict
public var particle: GameObject;
var hit : RaycastHit;
var raio:Ray;
function Start () {
//Screen.lockCursor = true;
transform.GetComponent.<Renderer>().material.color = Color.red;
}
function Update () {
raio = Camera.main.ScreenPointToRay(Input.mousePosition);
if( Physics.Raycast(raio,hit) ){
transform.position.x = hit.point.x;
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: 53a5e290627b94cb9964eade3816dcae
timeCreated: 1465219133
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 6da2004a5e5b8401aad5df4fab13e4f2
timeCreated: 1465222624
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
24;0;131073;-1
\ No newline at end of file
sceneSetups:
- path: Assets/teste.unity
isLoaded: 1
isActive: 1
unityRebuildLibraryVersion: 11
unityForwardCompatibleVersion: 40
0000.5728604b.0000
0000.5728604b.0000
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment