using System.Collections;
using System.Collections.Generic;
using UnityEngine;
///
/// 车
///
public abstract class Car : MonoBehaviour
{
///
/// 是否死亡
///
public bool isDie;
///
/// 变道距离
///
protected float laneChangeDistance = 4.4f;
///
/// 刚体
///
protected Rigidbody rb;
///
/// 碰撞体
///
public Collider carCollider;
///
/// 车皮肤
///
public SkinCar skinCar;
///
/// 大小类型
///
protected E_CarSizeType e_carSizeType;
///
/// 变道
///
public abstract void ChangeLanes(E_DirectionType e_DirectionType,float speed);
protected virtual void Awake()
{
rb = GetComponent();
}
///
/// 设置碰撞体
///
public void SetColl()
{
switch (e_carSizeType)
{
case E_CarSizeType.Big:
(carCollider as BoxCollider).center = GameNumericalValue.bigCenter;
(carCollider as BoxCollider).size = GameNumericalValue.bigSize;
break;
case E_CarSizeType.little:
(carCollider as BoxCollider).center = GameNumericalValue.littleCenter;
(carCollider as BoxCollider).size = GameNumericalValue.littleSize;
break;
}
}
}