28 lines
715 B
C#
28 lines
715 B
C#
using Framework;
|
|
using Gameplay.Vehicle.Data;
|
|
using UnityEngine;
|
|
|
|
namespace Gameplay.Vehicle.Impl
|
|
{
|
|
public class PreviewVehicle: BaseVehicle
|
|
{
|
|
|
|
public PreviewVehicle(uint id, VehicleConfigData configData, int troopId) : base(id,configData, troopId)
|
|
{
|
|
}
|
|
|
|
public void PrepareReady()
|
|
{
|
|
EventManager.Instance.Send(EventManager.EventName.LevelUnitBorn, this);
|
|
}
|
|
|
|
public void PreviewUpdate(float dt)
|
|
{
|
|
if(Node == null) return;
|
|
Node.GameObject.transform.position = transData.pos;
|
|
Node.GameObject.transform.rotation = Quaternion.Euler(0, transData.yaw, 0);
|
|
}
|
|
|
|
}
|
|
}
|