historique du chat fonctionnel.
Cependant l'UI ne capture toujours pas les clics... Bug au niveau du chat: les messages ne s'affichent plus du à un bug de unity => tous les appels à des objets par des scripts ont disparus.
This commit is contained in:
parent
b2ae190af3
commit
15698eebb4
|
@ -0,0 +1,218 @@
|
||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!91 &9100000
|
||||||
|
AnimatorController:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_Name: day_controller
|
||||||
|
serializedVersion: 2
|
||||||
|
m_AnimatorParameters:
|
||||||
|
- m_Name: day_status
|
||||||
|
m_Type: 3
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
m_AnimatorLayers:
|
||||||
|
- serializedVersion: 3
|
||||||
|
m_Name: Base Layer
|
||||||
|
m_StateMachine: {fileID: 110700000}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_StateMachineMotionSetIndex: 0
|
||||||
|
m_DefaultWeight: 0
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
--- !u!1101 &110100000
|
||||||
|
Transition:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_ObjectHideFlags: 3
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_Name:
|
||||||
|
m_SrcState: {fileID: 110206034}
|
||||||
|
m_DstState: {fileID: 110205094}
|
||||||
|
m_TransitionDuration: .100000001
|
||||||
|
m_TransitionOffset: 0
|
||||||
|
m_Conditions:
|
||||||
|
- m_ConditionMode: 6
|
||||||
|
m_ConditionEvent: day_status
|
||||||
|
m_EventTreshold: 1
|
||||||
|
m_ExitTime: .899999976
|
||||||
|
m_Atomic: 1
|
||||||
|
m_Solo: 0
|
||||||
|
m_Mute: 0
|
||||||
|
m_CanTransitionToSelf: 0
|
||||||
|
--- !u!1101 &110139902
|
||||||
|
Transition:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_ObjectHideFlags: 3
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_Name:
|
||||||
|
m_SrcState: {fileID: 110205094}
|
||||||
|
m_DstState: {fileID: 110200000}
|
||||||
|
m_TransitionDuration: .100000001
|
||||||
|
m_TransitionOffset: 0
|
||||||
|
m_Conditions:
|
||||||
|
- m_ConditionMode: 5
|
||||||
|
m_ConditionEvent: day_status
|
||||||
|
m_EventTreshold: 0
|
||||||
|
m_ExitTime: .899999976
|
||||||
|
m_Atomic: 1
|
||||||
|
m_Solo: 0
|
||||||
|
m_Mute: 0
|
||||||
|
m_CanTransitionToSelf: 0
|
||||||
|
--- !u!1101 &110145842
|
||||||
|
Transition:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_ObjectHideFlags: 3
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_Name:
|
||||||
|
m_SrcState: {fileID: 110200000}
|
||||||
|
m_DstState: {fileID: 110297379}
|
||||||
|
m_TransitionDuration: .100000001
|
||||||
|
m_TransitionOffset: 0
|
||||||
|
m_Conditions:
|
||||||
|
- m_ConditionMode: 6
|
||||||
|
m_ConditionEvent: day_status
|
||||||
|
m_EventTreshold: 0
|
||||||
|
m_ExitTime: .899999976
|
||||||
|
m_Atomic: 1
|
||||||
|
m_Solo: 0
|
||||||
|
m_Mute: 0
|
||||||
|
m_CanTransitionToSelf: 0
|
||||||
|
--- !u!1101 &110179087
|
||||||
|
Transition:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_ObjectHideFlags: 3
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_Name:
|
||||||
|
m_SrcState: {fileID: 110297379}
|
||||||
|
m_DstState: {fileID: 110206034}
|
||||||
|
m_TransitionDuration: .100000001
|
||||||
|
m_TransitionOffset: 0
|
||||||
|
m_Conditions:
|
||||||
|
- m_ConditionMode: 5
|
||||||
|
m_ConditionEvent: day_status
|
||||||
|
m_EventTreshold: 0
|
||||||
|
m_ExitTime: .899999976
|
||||||
|
m_Atomic: 1
|
||||||
|
m_Solo: 0
|
||||||
|
m_Mute: 0
|
||||||
|
m_CanTransitionToSelf: 0
|
||||||
|
--- !u!1102 &110200000
|
||||||
|
State:
|
||||||
|
m_ObjectHideFlags: 3
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_Name: Night
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Motions:
|
||||||
|
- {fileID: 0}
|
||||||
|
m_ParentStateMachine: {fileID: 110700000}
|
||||||
|
m_Position: {x: 264, y: 204, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_Mirror: 0
|
||||||
|
m_Tag:
|
||||||
|
--- !u!1102 &110205094
|
||||||
|
State:
|
||||||
|
m_ObjectHideFlags: 3
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_Name: D/N
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Motions:
|
||||||
|
- {fileID: 0}
|
||||||
|
m_ParentStateMachine: {fileID: 110700000}
|
||||||
|
m_Position: {x: 480, y: 36, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_Mirror: 0
|
||||||
|
m_Tag:
|
||||||
|
--- !u!1102 &110206034
|
||||||
|
State:
|
||||||
|
m_ObjectHideFlags: 3
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_Name: Day
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Motions:
|
||||||
|
- {fileID: 0}
|
||||||
|
m_ParentStateMachine: {fileID: 110700000}
|
||||||
|
m_Position: {x: 264, y: -120, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_Mirror: 0
|
||||||
|
m_Tag:
|
||||||
|
--- !u!1102 &110297379
|
||||||
|
State:
|
||||||
|
m_ObjectHideFlags: 3
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_Name: N/D
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Motions:
|
||||||
|
- {fileID: 0}
|
||||||
|
m_ParentStateMachine: {fileID: 110700000}
|
||||||
|
m_Position: {x: 48, y: 36, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_Mirror: 0
|
||||||
|
m_Tag:
|
||||||
|
--- !u!1107 &110700000
|
||||||
|
StateMachine:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_ObjectHideFlags: 3
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_Name: Base Layer
|
||||||
|
m_DefaultState: {fileID: 110206034}
|
||||||
|
m_States:
|
||||||
|
- {fileID: 110200000}
|
||||||
|
- {fileID: 110206034}
|
||||||
|
- {fileID: 110205094}
|
||||||
|
- {fileID: 110297379}
|
||||||
|
m_ChildStateMachine: []
|
||||||
|
m_ChildStateMachinePosition: []
|
||||||
|
m_OrderedTransitions:
|
||||||
|
data:
|
||||||
|
first: {fileID: 110297379}
|
||||||
|
second:
|
||||||
|
- {fileID: 110179087}
|
||||||
|
data:
|
||||||
|
first: {fileID: 110205094}
|
||||||
|
second:
|
||||||
|
- {fileID: 110139902}
|
||||||
|
data:
|
||||||
|
first: {fileID: 110206034}
|
||||||
|
second:
|
||||||
|
- {fileID: 110100000}
|
||||||
|
data:
|
||||||
|
first: {fileID: 110200000}
|
||||||
|
second:
|
||||||
|
- {fileID: 110145842}
|
||||||
|
m_MotionSetCount: 1
|
||||||
|
m_AnyStatePosition: {x: 696, y: -216, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
--- !u!1107 &110784658
|
||||||
|
StateMachine:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_ObjectHideFlags: 3
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_Name: New StateMachine
|
||||||
|
m_DefaultState: {fileID: 0}
|
||||||
|
m_States: []
|
||||||
|
m_ChildStateMachine: []
|
||||||
|
m_ChildStateMachinePosition: []
|
||||||
|
m_OrderedTransitions: {}
|
||||||
|
m_MotionSetCount: 2
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
|
@ -0,0 +1,4 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 04ebed81e5002b5428b0c928c261a900
|
||||||
|
NativeFormatImporter:
|
||||||
|
userData:
|
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
|
@ -0,0 +1,47 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5b533412749ae7f479b5b0e198032ffa
|
||||||
|
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
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: -1
|
||||||
|
maxTextureSize: 1024
|
||||||
|
textureSettings:
|
||||||
|
filterMode: -1
|
||||||
|
aniso: 16
|
||||||
|
mipBias: -1
|
||||||
|
wrapMode: 1
|
||||||
|
nPOTScale: 0
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
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:
|
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
|
@ -0,0 +1,47 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a9468ec2161fccf44adf725aef0cf902
|
||||||
|
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
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: -1
|
||||||
|
maxTextureSize: 1024
|
||||||
|
textureSettings:
|
||||||
|
filterMode: -1
|
||||||
|
aniso: 16
|
||||||
|
mipBias: -1
|
||||||
|
wrapMode: 1
|
||||||
|
nPOTScale: 0
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
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:
|
Binary file not shown.
|
@ -0,0 +1,65 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 128c7fd232e251944822060aa6611269
|
||||||
|
ModelImporter:
|
||||||
|
serializedVersion: 16
|
||||||
|
fileIDToRecycleName:
|
||||||
|
100000: //RootNode
|
||||||
|
400000: //RootNode
|
||||||
|
2300000: //RootNode
|
||||||
|
3300000: //RootNode
|
||||||
|
4300000: g_ant_1
|
||||||
|
9500000: //RootNode
|
||||||
|
materials:
|
||||||
|
importMaterials: 1
|
||||||
|
materialName: 0
|
||||||
|
materialSearch: 1
|
||||||
|
animations:
|
||||||
|
legacyGenerateAnimations: 4
|
||||||
|
bakeSimulation: 0
|
||||||
|
optimizeGameObjects: 0
|
||||||
|
motionNodeName:
|
||||||
|
animationCompression: 1
|
||||||
|
animationRotationError: .5
|
||||||
|
animationPositionError: .5
|
||||||
|
animationScaleError: .5
|
||||||
|
animationWrapMode: 0
|
||||||
|
extraExposedTransformPaths: []
|
||||||
|
clipAnimations: []
|
||||||
|
isReadable: 1
|
||||||
|
meshes:
|
||||||
|
lODScreenPercentages: []
|
||||||
|
globalScale: .100000001
|
||||||
|
meshCompression: 0
|
||||||
|
addColliders: 0
|
||||||
|
importBlendShapes: 1
|
||||||
|
swapUVChannels: 0
|
||||||
|
generateSecondaryUV: 0
|
||||||
|
useFileUnits: 1
|
||||||
|
optimizeMeshForGPU: 1
|
||||||
|
weldVertices: 1
|
||||||
|
secondaryUVAngleDistortion: 8
|
||||||
|
secondaryUVAreaDistortion: 15.000001
|
||||||
|
secondaryUVHardAngle: 88
|
||||||
|
secondaryUVPackMargin: 4
|
||||||
|
tangentSpace:
|
||||||
|
normalSmoothAngle: 60
|
||||||
|
splitTangentsAcrossUV: 1
|
||||||
|
normalImportMode: 0
|
||||||
|
tangentImportMode: 1
|
||||||
|
importAnimation: 1
|
||||||
|
copyAvatar: 0
|
||||||
|
humanDescription:
|
||||||
|
human: []
|
||||||
|
skeleton: []
|
||||||
|
armTwist: .5
|
||||||
|
foreArmTwist: .5
|
||||||
|
upperLegTwist: .5
|
||||||
|
legTwist: .5
|
||||||
|
armStretch: .0500000007
|
||||||
|
legStretch: .0500000007
|
||||||
|
feetSpacing: 0
|
||||||
|
rootMotionBoneName:
|
||||||
|
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||||
|
animationType: 2
|
||||||
|
additionalBone: 0
|
||||||
|
userData:
|
3581
Assets/scene.unity
3581
Assets/scene.unity
File diff suppressed because it is too large
Load Diff
|
@ -18,10 +18,10 @@ public class Clock : MonoBehaviour {
|
||||||
float fRot = clock.transform.rotation.z;
|
float fRot = clock.transform.rotation.z;
|
||||||
|
|
||||||
if(fRot>=0 && fRot<180){
|
if(fRot>=0 && fRot<180){
|
||||||
clock.transform.Rotate(0, 0, (float)(Time.deltaTime * 180.0/150.0));//2.5min
|
clock.transform.Rotate(0, 0, (float)(Time.deltaTime * (-180.0)/150.0));//2.5min
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
clock.transform.Rotate(0, 0, (float)(Time.deltaTime * 180.0/60.0));//1min
|
clock.transform.Rotate(0, 0, (float)(Time.deltaTime * (-180.0)/60.0));//1min
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,7 @@ public class CreateScrollList : MonoBehaviour {
|
||||||
public Transform contentPanel;
|
public Transform contentPanel;
|
||||||
public Image portrait;
|
public Image portrait;
|
||||||
public ScrollRect scrollrect;
|
public ScrollRect scrollrect;
|
||||||
|
public InputField myfield;
|
||||||
GameObject chat_input;
|
GameObject chat_input;
|
||||||
TchatAnim tchatAnim;
|
TchatAnim tchatAnim;
|
||||||
string message_old;
|
string message_old;
|
||||||
|
@ -26,10 +27,11 @@ public class CreateScrollList : MonoBehaviour {
|
||||||
|
|
||||||
// Use this for initialization
|
// Use this for initialization
|
||||||
void Start () {
|
void Start () {
|
||||||
//PopulateList ();
|
PopulateList ();
|
||||||
chat_input = GameObject.Find ("tchat_complet");
|
chat_input = GameObject.Find ("tchat_complet");
|
||||||
tchatAnim = chat_input.GetComponent<TchatAnim> ();
|
tchatAnim = chat_input.GetComponent<TchatAnim> ();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PopulateList(){
|
void PopulateList(){
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
using UnityEngine;
|
||||||
|
using System.Collections;
|
||||||
|
|
||||||
|
public class NewBehaviourScript : MonoBehaviour {
|
||||||
|
CanvasGroup grp;
|
||||||
|
// Use this for initialization
|
||||||
|
void Start () {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update () {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: da0f09705b89fa346b50f7e244179a80
|
||||||
|
MonoImporter:
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
|
@ -11,17 +11,21 @@ public class OnClickedMoveCamera : MonoBehaviour {
|
||||||
private Color clrBase;
|
private Color clrBase;
|
||||||
private Color clrTarget;
|
private Color clrTarget;
|
||||||
private Renderer[] children;
|
private Renderer[] children;
|
||||||
|
public Canvas canva;
|
||||||
|
|
||||||
void Awake(){
|
void Awake(){
|
||||||
clrBase = renderer.material.color;
|
clrBase = renderer.material.color;
|
||||||
clrTarget = clrBase;
|
clrTarget = clrBase;
|
||||||
children = GetComponentsInChildren<Renderer>();
|
children = GetComponentsInChildren<Renderer>();
|
||||||
|
//canva = destination.GetComponentInChildren (Canvas);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void OnMouseDown(){
|
void OnMouseDown(){
|
||||||
//Move to position
|
//Move to position
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
camCtrl.targetPos = destination.position;
|
camCtrl.targetPos = destination.position;
|
||||||
camCtrl.targetRot = destination.rotation;
|
camCtrl.targetRot = destination.rotation;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
using UnityEngine;
|
||||||
|
using System.Collections;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
public class chat_window : MonoBehaviour {
|
||||||
|
|
||||||
|
public Text text_chat;
|
||||||
|
public ScrollRect scrollrect;
|
||||||
|
|
||||||
|
GameObject chat_input;
|
||||||
|
TchatAnim tchatAnim;
|
||||||
|
string message_old;
|
||||||
|
|
||||||
|
// Use this for initialization
|
||||||
|
void Start () {
|
||||||
|
|
||||||
|
chat_input = GameObject.Find ("tchat_complet");
|
||||||
|
tchatAnim = chat_input.GetComponent<TchatAnim> ();
|
||||||
|
text_chat.text = "";
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update () {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (Input.GetKeyDown ("space") && tchatAnim.message != message_old) {
|
||||||
|
|
||||||
|
scrollrect.verticalNormalizedPosition = 0;
|
||||||
|
text_chat.text += "perceval > " + tchatAnim.message + "\n";
|
||||||
|
message_old= tchatAnim.message;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b291226aa9641df46a8b0236eceaf0a4
|
||||||
|
MonoImporter:
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
|
@ -0,0 +1,51 @@
|
||||||
|
using UnityEngine;
|
||||||
|
using System.Collections;
|
||||||
|
|
||||||
|
public class day_controller : MonoBehaviour {
|
||||||
|
|
||||||
|
public Animator machine;
|
||||||
|
public int maxDay;
|
||||||
|
public int maxNight;
|
||||||
|
float timer;
|
||||||
|
// Use this for initialization
|
||||||
|
void Start () {
|
||||||
|
|
||||||
|
machine.SetInteger ("day_status", 0);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update () {
|
||||||
|
|
||||||
|
if (machine.GetInteger("day_status")==0){
|
||||||
|
print("il fait jour");
|
||||||
|
|
||||||
|
if (timer >= (float)maxDay-1){
|
||||||
|
timer =0;
|
||||||
|
machine.SetInteger("day_status",1);
|
||||||
|
}
|
||||||
|
|
||||||
|
else{
|
||||||
|
timer += Time.deltaTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (machine.GetInteger("day_status")==1){
|
||||||
|
print("il fait nuit");
|
||||||
|
|
||||||
|
if (timer >= (float)maxNight-1){
|
||||||
|
timer =0;
|
||||||
|
machine.SetInteger("day_status",0);
|
||||||
|
}
|
||||||
|
|
||||||
|
else{
|
||||||
|
timer += Time.deltaTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 4f835c976f46f244f92d17940e11a552
|
||||||
|
MonoImporter:
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
Loading…
Reference in New Issue