UpdateDiamondRotation
How do I use Update Diamond Rotation
Below are practical examples compiled from projects for learning and reference purposes
Featured Snippets
Line | Code | Ex.. |
---|---|---|
58 | UpdateDiamondRotation(); | 1 |
79 | void UpdateDiamondRotation() | 2 |
File name: PlayerDiamond.cs
Copy
55 void Update()
56 {
57 UpdateDiamondPosition();
58 UpdateDiamondRotation();
59 UpdateDiamondVisibility();
60 }
File name: PlayerDiamond.cs
Copy
79 void UpdateDiamondRotation()
80 {
81 m_Rotation += Time.deltaTime * 180f;
82 m_Rotation = m_Rotation % 360;
83
84 transform.rotation = Quaternion.Euler( 0, m_Rotation, 0 );
85 }
UpdateDiamondRotation 145 lượt xem
Gõ tìm kiếm nhanh...