Skip to content

Commit 71a32c2

Browse files
committed
creati script per il timer
non ancora funzionante al 100%
1 parent 8a1be5a commit 71a32c2

16 files changed

Lines changed: 171 additions & 4 deletions
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6+
<ProductVersion>10.0.20506</ProductVersion>
7+
<SchemaVersion>2.0</SchemaVersion>
8+
<ProjectGuid>{0CDEF5B4-5D89-843D-4E19-A4A5D599C4FF}</ProjectGuid>
9+
<OutputType>Library</OutputType>
10+
<AppDesignerFolder>Properties</AppDesignerFolder>
11+
<RootNamespace></RootNamespace>
12+
<AssemblyName>Assembly-UnityScript</AssemblyName>
13+
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
14+
<FileAlignment>512</FileAlignment>
15+
</PropertyGroup>
16+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17+
<DebugSymbols>true</DebugSymbols>
18+
<DebugType>full</DebugType>
19+
<Optimize>false</Optimize>
20+
<OutputPath>Temp\bin\Debug\</OutputPath>
21+
<DefineConstants>DEBUG;TRACE;UNITY_STANDALONE_WIN;ENABLE_MICROPHONE;ENABLE_TEXTUREID_MAP;ENABLE_AUDIO_FMOD;UNITY_STANDALONE;ENABLE_MONO;ENABLE_TERRAIN;ENABLE_SUBSTANCE;ENABLE_GENERICS;ENABLE_MOVIES;ENABLE_WWW;ENABLE_IMAGEEFFECTS;ENABLE_WEBCAM;RENDER_SOFTWARE_CURSOR;ENABLE_NETWORK;ENABLE_PHYSICS;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_SHADOWS;ENABLE_AUDIO;ENABLE_DUCK_TYPING;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;UNITY_4_2_0;UNITY_4_2;ENABLE_PROFILER;UNITY_EDITOR;UNITY_EDITOR_WIN</DefineConstants>
22+
<ErrorReport>prompt</ErrorReport>
23+
<WarningLevel>4</WarningLevel>
24+
<NoWarn>0169</NoWarn>
25+
</PropertyGroup>
26+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
27+
<DebugType>pdbonly</DebugType>
28+
<Optimize>true</Optimize>
29+
<OutputPath>Temp\bin\Release\</OutputPath>
30+
<DefineConstants>TRACE</DefineConstants>
31+
<ErrorReport>prompt</ErrorReport>
32+
<WarningLevel>4</WarningLevel>
33+
<NoWarn>0169</NoWarn>
34+
</PropertyGroup>
35+
<ItemGroup>
36+
<Reference Include="System" />
37+
<Reference Include="System.XML" />
38+
<Reference Include="System.Core" />
39+
<Reference Include="UnityEngine">
40+
<HintPath>C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEngine.dll</HintPath>
41+
</Reference>
42+
<Reference Include="UnityEditor">
43+
<HintPath>C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEditor.dll</HintPath>
44+
</Reference>
45+
</ItemGroup>
46+
<ItemGroup>
47+
<Compile Include="Assets\Timer.js" />
48+
<Compile Include="Assets\Trigger_script.js" />
49+
<None Include="Assets\Standard Assets\Water (Basic)\Sources\Shaders\FX-Water Simple.shader" />
50+
</ItemGroup>
51+
<ItemGroup>
52+
<ProjectReference Include="Assembly-CSharp-firstpass-vs.csproj">
53+
<Project>{2662B409-6332-1E56-D797-C9025C53BDD6}</Project> <Name>Assembly-CSharp-firstpass-vs</Name> </ProjectReference>
54+
</ItemGroup>
55+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
56+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
57+
Other similar extension points exist, see Microsoft.Common.targets.
58+
<Target Name="BeforeBuild">
59+
</Target>
60+
<Target Name="AfterBuild">
61+
</Target>
62+
-->
63+
64+
</Project>

Unity/Assembly-UnityScript.pidb

7.36 KB
Binary file not shown.
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6+
<ProductVersion>10.0.20506</ProductVersion>
7+
<SchemaVersion>2.0</SchemaVersion>
8+
<ProjectGuid>{0CDEF5B4-5D89-843D-4E19-A4A5D599C4FF}</ProjectGuid>
9+
<OutputType>Library</OutputType>
10+
<AppDesignerFolder>Properties</AppDesignerFolder>
11+
<RootNamespace></RootNamespace>
12+
<AssemblyName>Assembly-UnityScript</AssemblyName>
13+
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
14+
<FileAlignment>512</FileAlignment>
15+
</PropertyGroup>
16+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17+
<DebugSymbols>true</DebugSymbols>
18+
<DebugType>full</DebugType>
19+
<Optimize>false</Optimize>
20+
<OutputPath>Temp\bin\Debug\</OutputPath>
21+
<DefineConstants>DEBUG;TRACE;UNITY_STANDALONE_WIN;ENABLE_MICROPHONE;ENABLE_TEXTUREID_MAP;ENABLE_AUDIO_FMOD;UNITY_STANDALONE;ENABLE_MONO;ENABLE_TERRAIN;ENABLE_SUBSTANCE;ENABLE_GENERICS;ENABLE_MOVIES;ENABLE_WWW;ENABLE_IMAGEEFFECTS;ENABLE_WEBCAM;RENDER_SOFTWARE_CURSOR;ENABLE_NETWORK;ENABLE_PHYSICS;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_SHADOWS;ENABLE_AUDIO;ENABLE_DUCK_TYPING;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;UNITY_4_2_0;UNITY_4_2;ENABLE_PROFILER;UNITY_EDITOR;UNITY_EDITOR_WIN</DefineConstants>
22+
<ErrorReport>prompt</ErrorReport>
23+
<WarningLevel>4</WarningLevel>
24+
<NoWarn>0169</NoWarn>
25+
</PropertyGroup>
26+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
27+
<DebugType>pdbonly</DebugType>
28+
<Optimize>true</Optimize>
29+
<OutputPath>Temp\bin\Release\</OutputPath>
30+
<DefineConstants>TRACE</DefineConstants>
31+
<ErrorReport>prompt</ErrorReport>
32+
<WarningLevel>4</WarningLevel>
33+
<NoWarn>0169</NoWarn>
34+
</PropertyGroup>
35+
<ItemGroup>
36+
<Reference Include="System" />
37+
<Reference Include="System.XML" />
38+
<Reference Include="System.Core" />
39+
<Reference Include="UnityEngine">
40+
<HintPath>C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEngine.dll</HintPath>
41+
</Reference>
42+
<Reference Include="UnityEditor">
43+
<HintPath>C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEditor.dll</HintPath>
44+
</Reference>
45+
</ItemGroup>
46+
<ItemGroup>
47+
<Compile Include="Assets\Timer.js" />
48+
<Compile Include="Assets\Trigger_script.js" />
49+
<None Include="Assets\Standard Assets\Water (Basic)\Sources\Shaders\FX-Water Simple.shader" />
50+
</ItemGroup>
51+
<ItemGroup>
52+
<ProjectReference Include="Assembly-CSharp-firstpass.csproj">
53+
<Project>{2662B409-6332-1E56-D797-C9025C53BDD6}</Project> <Name>Assembly-CSharp-firstpass</Name> </ProjectReference>
54+
</ItemGroup>
55+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
56+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
57+
Other similar extension points exist, see Microsoft.Common.targets.
58+
<Target Name="BeforeBuild">
59+
</Target>
60+
<Target Name="AfterBuild">
61+
</Target>
62+
-->
63+
64+
</Project>

Unity/Assets/Labirinto.unity

3.27 KB
Binary file not shown.

Unity/Assets/Timer.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#pragma strict
2+
private var startTime:float;
3+
var textTime:String;
4+
var Flag:boolean;
5+
6+
function Start () {
7+
startTime=Time.time;
8+
Flag=true;
9+
}
10+
11+
function Update () {
12+
13+
if (Flag)
14+
{
15+
var guitime=Time.time-startTime;
16+
var minutes = guitime/60;
17+
var seconds = guitime%60;
18+
var fraction = (guitime *100)%100;
19+
20+
textTime=String.Format("{0:00}:{1:00}:{2:00}",minutes,seconds,fraction);
21+
GetComponent(GUIText).text = textTime;
22+
}
23+
}

Unity/Assets/Trigger_script.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
function OnTriggerEnter() {
2+
//oggettoPalla = GameObject.Find("Palla");
3+
//componenteValoredado = oggettoDado.GetComponent("ValoreDado");
4+
//componenteValoredado.valoreCorrente = valoreFaccia;
5+
//Debug.Log(valoreFaccia);
6+
objGuiText = GameObject.Find("Testo");
7+
componenteTimer = objGuiText.GetComponent("Timer");
8+
componenteTimer.Flag=false;
9+
}
60 Bytes
Binary file not shown.
3 KB
Binary file not shown.
622 Bytes
Binary file not shown.

Unity/Library/assetDatabase3

400 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)