WebGL初始化

master
GamerHJD 3 years ago
parent c4cafe2996
commit 4ce3d1600c

@ -498,6 +498,7 @@ GameObject:
- component: {fileID: 1317834824}
- component: {fileID: 2997252462601936660}
- component: {fileID: 4806489167474073388}
- component: {fileID: 3733720769268392713}
m_Layer: 0
m_Name: Car_1
m_TagString: Car
@ -559,8 +560,8 @@ BoxCollider:
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 3, y: 1, z: 10}
m_Center: {x: 0, y: 0.74, z: 6.99}
m_Size: {x: 3.5188322, y: 1, z: 8.888192}
m_Center: {x: 0.2594161, y: 0.74, z: 6.434096}
--- !u!54 &4806489167474073388
Rigidbody:
m_ObjectHideFlags: 0
@ -573,10 +574,23 @@ Rigidbody:
m_Drag: 0
m_AngularDrag: 0.05
m_UseGravity: 1
m_IsKinematic: 1
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!65 &3733720769268392713
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5940721742220849789}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1.7861338, y: 2.6640887, z: 5.044007}
m_Center: {x: 0.39306688, y: 1.3077829, z: -1.2198503}
--- !u!1 &5940721742220849791
GameObject:
m_ObjectHideFlags: 0

@ -28,7 +28,7 @@ public class GameRoot : MonoBehaviour
private void Update()
{
carSys.CreatCar(0.5f);//每n秒随机出发点创建汽车
carSys.CreatCar(1);//每n秒随机出发点创建汽车
roadSys.RoadStateUpdate(3);//每n秒检测路段状态
}
}

@ -99,6 +99,7 @@ public class CarSys : MonoBehaviour
//回收车辆
Destroy(agent.gameObject);
GameRoot.Instance.infoWnd.SetCarText(-1);
}
}

@ -0,0 +1,29 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DriveState : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
private void OnTriggerEnter(Collider other)
{
Debug.Log("1");
}
private void OnTriggerExit(Collider other)
{
}
}
Loading…
Cancel
Save