public override void OnAdd() { m_SelfTransform = behavior.transform; TarVSpeed = -behavior.MaxFallSpeed; m_AnimComp = behavior.GetEntityComp <AnimComp>() as AnimComp; m_InputComp = behavior.GetEntityComp <InputComp>() as InputComp; m_RotateComp = behavior.GetEntityComp <RotateComp>() as RotateComp; //0.1s同步一次到服务端 syncFrame = (int)(Application.targetFrameRate * 0.1f); }
public override void OnRemove() { m_AnimComp = null; m_InputComp = null; m_RotateComp = null; }