コード例 #1
0
ファイル: SVGCameraEditor.cs プロジェクト: CptMedo/Mars
 private void DrawInspector(SVGCameraBehaviour svgCamera)
 {
     // show dimensions in pixel and world units
     EditorGUILayout.LabelField("Width (pixel units)", svgCamera.PixelWidth.ToString());
     EditorGUILayout.LabelField("Height (pixel units)", svgCamera.PixelHeight.ToString());
     EditorGUILayout.LabelField("Width (world units)", svgCamera.WorldWidth.ToString());
     EditorGUILayout.LabelField("Height (world units)", svgCamera.WorldHeight.ToString());
 }
コード例 #2
0
 private void DrawInspector(SVGCameraBehaviour svgCamera)
 {
     // show dimensions in pixel and world units
     EditorGUILayout.LabelField("Width (pixel units)", svgCamera.PixelWidth.ToString());
     EditorGUILayout.LabelField("Height (pixel units)", svgCamera.PixelHeight.ToString());
     EditorGUILayout.LabelField("Width (world units)", svgCamera.WorldWidth.ToString());
     EditorGUILayout.LabelField("Height (world units)", svgCamera.WorldHeight.ToString());
 }
コード例 #3
0
    public override void OnInspectorGUI()
    {
        // get the target object
        SVGCameraBehaviour camera = target as SVGCameraBehaviour;

        if (camera != null)
        {
            this.DrawInspector(camera);
        }
    }
コード例 #4
0
ファイル: GameBehaviour.cs プロジェクト: CptMedo/Mars
 // Reset is called when the user hits the Reset button in the Inspector's context menu or when adding the component the first time.
 // This function is only called in editor mode. Reset is most commonly used to give good default values in the inspector.
 void Reset()
 {
     this.Camera = null;
     this.Background = null;
     this.Atlas = null;
     this.Cards = null;
     this.m_SelectedCard0 = null;
     this.m_SelectedCard1 = null;
     this.m_Animating = false;
 }
コード例 #5
0
ファイル: OrcBehaviour.cs プロジェクト: CptMedo/Mars
 void Start()
 {
     // start with the "idle" animation
     this.m_Animator = this.gameObject.GetComponent<Animator>();
     this.IdleAnimation();
     // move the background at world origin and get the reference to its monobehaviour script
     if (this.Background != null)
     {
         this.Background.transform.position = new Vector3(0, 0, 0);
         this.Background = this.Background.GetComponent<SVGBackgroundBehaviour>();
     }
     // register handler for device orientation change
     this.Camera = (this.Camera != null) ? this.Camera.GetComponent<SVGCameraBehaviour>() : null;
     if (this.Camera != null)
     {
         // register ourself for receiving resize events
         this.Camera.OnResize += this.OnResize;
         // now fire a resize event by hand
         this.Camera.Resize(true);
     }
 }