public Texture GetTipsSprite(Vector3Int pos, enRotate rotate, bool isEmpNull = false) { if (m_mapTips == null) { return(null); } if (isEmpNull && (m_mapTips.GetShape(pos) == 0)) { return(null); } return(GetSprite(m_mapTips.GetShape(pos), rotate)); }
void Flip(enRotate en) { Bitmap bitmap1 = (Bitmap)pdCapture.Image; if (bitmap1 == null) { return; } switch (en) { case enRotate.left: { bitmap1.RotateFlip(RotateFlipType.Rotate270FlipNone); } break; case enRotate.right: { bitmap1.RotateFlip(RotateFlipType.Rotate90FlipNone); } break; case enRotate.flipX: { bitmap1.RotateFlip(RotateFlipType.Rotate180FlipY); } break; case enRotate.flipY: { bitmap1.RotateFlip(RotateFlipType.Rotate180FlipNone); } break; default: break; } SetImageInPicturebox((Bitmap)bitmap1.Clone()); }
public Texture GetSelectedSprite(enRotate rotate) { return(GetSprite(m_selectedShape, rotate)); }
//スプライトの取得 public Texture GetSprite(EnumShapeType spriteNo, enRotate rotate) { // Debug.Log(rotate); return(m_mapShapeTex[(int)spriteNo + ((m_mapShapeTex.Count / 4) * (int)rotate)]); }
void OnGUI() { try { if (m_parent == null) { Close(); return; } m_isRepaint = false; if (m_gridRect == null) { Init(); } EditorGUI.BeginChangeCheck(); GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); int sd = EditorGUILayout.IntField("selectedDepth", m_selectedDepth); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); Vector2 cp = EditorGUILayout.Vector2Field("campos", m_camPos); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); enRotate ro = (enRotate)EditorGUILayout.EnumPopup("rotate", m_camRotate); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); int pd = EditorGUILayout.IntField("penDepth", m_penDepth); GUILayout.EndHorizontal(); if (EditorGUI.EndChangeCheck()) { m_camPos = cp; m_selectedDepth = sd; m_camRotate = ro; m_penDepth = pd; } //入力系 Input(); //描画系 //画像の描画 DrawMapTip(); if (m_isRepaint) { Repaint(); m_parent.RepaintFrontView(); } } catch (System.Exception exeption) { if (exeption is ExitGUIException) { throw exeption; } else { Debug.LogError(exeption.ToString()); } } }