// =========================================================== // Methods for/from SuperClass/Interfaces // =========================================================== // =========================================================== // Methods // =========================================================== void OnEnable() { layer = target as MadLevelBackgroundLayer; texture = serializedObject.FindProperty("texture"); tint = serializedObject.FindProperty("tint"); scaleMode = serializedObject.FindProperty("scaleMode"); scale = serializedObject.FindProperty("scale"); align = serializedObject.FindProperty("align"); position = serializedObject.FindProperty("position"); followSpeed = serializedObject.FindProperty("followSpeed"); scrollSpeed = serializedObject.FindProperty("scrollSpeed"); }
// =========================================================== // Methods for/from SuperClass/Interfaces // =========================================================== // =========================================================== // Methods // =========================================================== void OnEnable() { layer = target as MadLevelBackgroundLayer; texture = serializedObject.FindProperty("texture"); tint = serializedObject.FindProperty("tint"); scaleMode = serializedObject.FindProperty("scaleMode"); dontStretch = serializedObject.FindProperty("dontStretch"); repeatX = serializedObject.FindProperty("repeatX"); repeatY = serializedObject.FindProperty("repeatY"); fillMarginLeft = serializedObject.FindProperty("fillMarginLeft"); fillMarginTop = serializedObject.FindProperty("fillMarginTop"); fillMarginRight = serializedObject.FindProperty("fillMarginRight"); fillMarginBottom = serializedObject.FindProperty("fillMarginBottom"); scale = serializedObject.FindProperty("scale"); align = serializedObject.FindProperty("align"); position = serializedObject.FindProperty("position"); followSpeed = serializedObject.FindProperty("followSpeed"); scrollSpeed = serializedObject.FindProperty("scrollSpeed"); }
void MoveDown(MadLevelBackgroundLayer layer) { const string UndoName = "Move Layer Down"; MadUndo.RecordObject(script, UndoName); MadUndo.LegacyRegisterSceneUndo(UndoName); int index = script.layers.IndexOf(layer); if (index < script.layers.Count - 1) { var temp = script.layers[index + 1]; script.layers[index + 1] = layer; script.layers[index] = temp; MadUndo.RecordObject(temp.gameObject, UndoName); MadUndo.RecordObject(layer.gameObject, UndoName); temp.SetDirty(); layer.SetDirty(); } script.UpdateDepth(); }
bool CanMoveDown(MadLevelBackgroundLayer layer) { int index = script.layers.IndexOf(layer); return(index < script.layers.Count - 1); }
bool CanMoveUp(MadLevelBackgroundLayer layer) { int index = script.layers.IndexOf(layer); return(index > 0); }
bool CanMoveDown(MadLevelBackgroundLayer layer) { int index = script.layers.IndexOf(layer); return index < script.layers.Count - 1; }
bool CanMoveUp(MadLevelBackgroundLayer layer) { int index = script.layers.IndexOf(layer); return index > 0; }
public int IndexOf(MadLevelBackgroundLayer layer) { return(layers.IndexOf(layer)); }
public void RemoveLayer(MadLevelBackgroundLayer layer) { MadGameObject.SafeDestroy(layer.gameObject); layers.Remove(layer); }
public int IndexOf(MadLevelBackgroundLayer layer) { return layers.IndexOf(layer); }