Beispiel #1
0
 public virtual void Awake()
 {
     m_rigidbody      = gameObject.GetComponent <Rigidbody>();
     m_ShadowRenderer = GetComponent <BallShadowRenderer>();
     m_LightRenderer  = transform.FindChild("RefLight").GetComponent <Follower>();
     m_FocusRenderer  = transform.FindChild("Focus").GetComponent <Follower>();
     sphereCollider   = gameObject.GetComponent <SphereCollider>();
     m_Mesh           = GetComponent <MeshRenderer>();
     //m_BallPhysicalDrag = GetComponent<BallPhysicalDrag>();
     m_Radius           = sphereCollider.radius * transform.localScale.x;
     m_BallPhysicalDrag = PhysicalSupportTools.PhysicalDragTo(gameObject, ConstantData.GetPoolDatas().BallDrag, ConstantData.GetPoolDatas().BallAngularDrag);
     //m_AngularVelocityCorrection = PhysicalSupportTools.AngularVelocityCorrectionTo(gameObject, m_rigidbody, m_Radius);
     m_PhysicMaterial = collider.sharedMaterial;
 }
 public virtual void Awake()
 {
     m_rigidbody = gameObject.GetComponent<Rigidbody>();
     m_ShadowRenderer = GetComponent<BallShadowRenderer>();
     m_LightRenderer = transform.FindChild("RefLight").GetComponent<Follower>();
     m_FocusRenderer = transform.FindChild("Focus").GetComponent<Follower>();
     sphereCollider = gameObject.GetComponent<SphereCollider>();
     m_Mesh = GetComponent<MeshRenderer>();
     //m_BallPhysicalDrag = GetComponent<BallPhysicalDrag>();
     m_Radius = sphereCollider.radius * transform.localScale.x;
     m_BallPhysicalDrag = PhysicalSupportTools.PhysicalDragTo(gameObject, ConstantData.GetPoolDatas().BallDrag, ConstantData.GetPoolDatas().BallAngularDrag);
     //m_AngularVelocityCorrection = PhysicalSupportTools.AngularVelocityCorrectionTo(gameObject, m_rigidbody, m_Radius);
     m_PhysicMaterial = collider.sharedMaterial;
 }