This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| class Connect extends React.Component { | |
| constructor(props){ | |
| super(props); | |
| this.actions = this.getActions(this.props.actions); | |
| this.state = this.props.state || {}; | |
| } | |
| getActions(actions){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export default (...args) => { | |
| return args.reduce((a, it) => (...params) => { | |
| const d = it(...params); | |
| if(d.then) return d.then(a); | |
| else return a(d); | |
| }); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| public class IsometricMap : MonoBehaviour { | |
| public Texture2D pattern; | |
| public int pixelToUnit = 100; | |
| public Vector2 pixelSize = new Vector2(64, 64); | |
| public Vector2 markerPosition; | |
| void OnDrawGizmosSelected() { | |
| drawIcon(markerPosition, pixelSize, pixelToUnit); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using UnityEditor; | |
| [CustomEditor(typeof(IsometricMap))] | |
| public class IsometricMapEditor : Editor { | |
| private IsometricMap map; | |
| void OnEnable() { | |
| map = (IsometricMap) target; | |
| } |
NewerOlder