Override









How do I use Override
Below are practical examples compiled from projects for learning and reference purposes

Featured Snippets


File name: crBaoCao.cs Copy
24         public override string ResourceName {
25             get {
26                 return "crBaoCao.rpt";
27             }
28             set {
29                 // Do nothing
30             }
31         }
File name: crBaoCao.cs Copy
33         public override bool NewGenerator {
34             get {
35                 return true;
36             }
37             set {
38                 // Do nothing
39             }
40         }
File name: crBaoCao.cs Copy
42         public override string FullResourceName {
43             get {
44                 return "QuanLyDiem.crBaoCao.rpt";
45             }
46             set {
47                 // Do nothing
48             }
49         }
File name: rptThisinh.cs Copy
24         public override string ResourceName {
25             get {
26                 return "rptThisinh.rpt";
27             }
28             set {
29                 // Do nothing
30             }
31         }
File name: rptThisinh.cs Copy
33         public override bool NewGenerator {
34             get {
35                 return true;
36             }
37             set {
38                 // Do nothing
39             }
40         }
File name: rptThisinh.cs Copy
42         public override string FullResourceName {
43             get {
44                 return "Doan.rptThisinh.rpt";
45             }
46             set {
47                 // Do nothing
48             }
49         }
File name: DemoMecanimGUI.cs Copy
187     public override void OnJoinedRoom()
188     {
189         CreatePlayerObject();
190     }
File name: PhotonAnimatorViewEditor.cs Copy
18     public override void OnInspectorGUI()
19     {
20         //base.OnInspectorGUI();
21
22         if (this.m_Animator == null)
23         {
24             GUILayout.BeginVertical(GUI.skin.box);
25             GUILayout.Label("GameObject doesn't have an Animator component to synchronize");
26             GUILayout.EndVertical();
27             return;
28         }
29
30         DrawWeightInspector();
31
32         if (this.m_Animator.layerCount == 0)
33         {
34             GUILayout.BeginVertical(GUI.skin.box);
35             GUILayout.Label("Animator doesn't have any layers setup to synchronize");
36             GUILayout.EndVertical();
37         }
38
39         DrawParameterInspector();
40
41         if (GetParameterCount() == 0)
42         {
43             GUILayout.BeginVertical(GUI.skin.box);
44             GUILayout.Label("Animator doesn't have any parameters setup to synchronize");
45             GUILayout.EndVertical();
46         }
47
48         serializedObject.ApplyModifiedProperties();
49
50         //GUILayout.Label( "m_SynchronizeLayers " + serializedObject.FindProperty( "m_SynchronizeLayers" ).arraySize );
51         //GUILayout.Label( "m_SynchronizeParameters " + serializedObject.FindProperty( "m_SynchronizeParameters" ).arraySize );
52     }
File name: PhotonRigidbody2DViewEditor.cs Copy
7     public override void OnInspectorGUI()
8     {
9         PhotonGUI.ContainerHeader("Options");
10
11         Rect containerRect = PhotonGUI.ContainerBody(EditorGUIUtility.singleLineHeight*2 + 10);
12
13         Rect propertyRect = new Rect(containerRect.xMin + 5, containerRect.yMin + 5, containerRect.width, EditorGUIUtility.singleLineHeight);
14         EditorGUI.PropertyField(propertyRect, serializedObject.FindProperty("m_SynchronizeVelocity"), new GUIContent("Synchronize Velocity"));
15
16         propertyRect.y += EditorGUIUtility.singleLineHeight;
17         EditorGUI.PropertyField(propertyRect, serializedObject.FindProperty("m_SynchronizeAngularVelocity"), new GUIContent("Synchronize Angular Velocity"));
18     }
File name: PhotonRigidbodyViewEditor.cs Copy
7     public override void OnInspectorGUI()
8     {
9         PhotonGUI.ContainerHeader("Options");
10
11         Rect containerRect = PhotonGUI.ContainerBody(EditorGUIUtility.singleLineHeight*2 + 10);
12
13         Rect propertyRect = new Rect(containerRect.xMin + 5, containerRect.yMin + 5, containerRect.width, EditorGUIUtility.singleLineHeight);
14         EditorGUI.PropertyField(propertyRect, serializedObject.FindProperty("m_SynchronizeVelocity"), new GUIContent("Synchronize Velocity"));
15
16         propertyRect.y += EditorGUIUtility.singleLineHeight;
17         EditorGUI.PropertyField(propertyRect, serializedObject.FindProperty("m_SynchronizeAngularVelocity"), new GUIContent("Synchronize Angular Velocity"));
18     }

Override 154 lượt xem

Gõ tìm kiếm nhanh...