PlayMaker and Tiled to Addons folder. CHANGELOG and README to Docs folder.

This commit is contained in:
2016-10-22 17:21:00 +07:00
parent 890e54f1b0
commit f51d88e355
124 changed files with 540 additions and 710 deletions

View File

@@ -0,0 +1,50 @@
using UnityEngine;
using IsoTools.Internal;
using System.Collections.Generic;
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace IsoTools.Tiled {
[ExecuteInEditMode, DisallowMultipleComponent]
[RequireComponent(typeof(IsoObject))]
public class TiledMap : MonoBehaviour {
public TiledMapAsset Asset = null;
public TiledMapProperties Properties = null;
// ---------------------------------------------------------------------
//
// For editor
//
// ---------------------------------------------------------------------
#if UNITY_EDITOR
[SerializeField] bool _isShowGrid = false;
public bool isShowGrid {
get { return _isShowGrid; }
set { _isShowGrid = value; }
}
#endif
// ---------------------------------------------------------------------
//
// Messages
//
// ---------------------------------------------------------------------
#if UNITY_EDITOR
void OnDrawGizmos() {
var iso_object = GetComponent<IsoObject>();
if ( isShowGrid && iso_object && iso_object.isoWorld ) {
IsoUtils.DrawGrid(
iso_object.isoWorld,
iso_object.position, iso_object.size,
IsoUtils.ColorChangeA(Color.green, 0.5f));
}
}
#endif
}
}