public List <Vector3> movementArray; // = new List<Vector3>(); void Awake() { wasGenerated = false; _wasRender = false; _timeFindPath = 0; //s GameObject pObj_; pObj_ = GameObject.FindWithTag("oScene0"); scene0Script = pObj_.GetComponent <JTSScene0>(); movementArray = new List <Vector3>(); AStar.OnPathFinded += HandleAStarOnPathFinded; _gridTransforms = new List <List <Transform> >(); _nodeStatesGrid = new List <List <TileController> >(); _parentTransforms = new List <Transform>(); _numRows = int.Parse(_numRowsString); _numCols = int.Parse(_numColsString); _camera = Camera.main; // ROOT PARENT just for BEAUTY STRUCTURE GameObject go = new GameObject("GRID_MAP_NODES"); _parentTransform = go.transform; }
private List <Vector3> movementArray; // = new List<Vector3>(); // Use this for initialization void Start() { if (unitDiag == false) { moveRangeDiag = moveRangeLR - (moveRangeLR - 1); } else { moveRangeDiag = moveRangeLR; } rayHitPoint = new Vector3(0.0f, 0.0f, 0.0f); onTileIndex = 0; //maybe scan tile array at start ? //renderer.material.color = new Color( 1 , 1 , 1 , 0.5f ); gameObject.AddComponent("InputInterface"); //matchController = GameObject.Find("MatchControllerObj").GetComponent<MatchController>(); gameObject.tag = "Unit"; movementArray = new List <Vector3>(); GameObject pObj_; pObj_ = GameObject.FindWithTag("oScene0"); scene0Script = pObj_.GetComponent <JTSScene0>(); tilesArray = scene0Script.tileArray; enemyArray = scene0Script.enemyArray_debug; currentState = UnitState.CREATED; }
void Start() { GameObject pObj_; pObj_ = GameObject.FindWithTag("oScene0"); scene0Script = pObj_.GetComponent <JTSScene0>(); gameObject.AddComponent("InputInterface"); //gameObject.AddComponent("DragDropSurfaceTile"); UnHighlightTile(); matchController = GameObject.Find("MatchControllerObj").GetComponent <MatchController>(); isOccupied = false; }
void LateUpdate() { if (matchController == null) { matchController = GameObject.Find("MatchControllerObj").GetComponent <MatchController>(); } if (scene0Script == null) { GameObject pObj_; pObj_ = GameObject.FindWithTag("oScene0"); scene0Script = pObj_.GetComponent <JTSScene0>(); } }
// Use this for initialization void Start() { if ( unitDiag == false ) moveRangeDiag = moveRangeLR - ( moveRangeLR - 1 ); else moveRangeDiag = moveRangeLR; rayHitPoint = new Vector3( 0.0f , 0.0f , 0.0f ); onTileIndex = 0;//maybe scan tile array at start ? //renderer.material.color = new Color( 1 , 1 , 1 , 0.5f ); gameObject.AddComponent("InputInterface"); //matchController = GameObject.Find("MatchControllerObj").GetComponent<MatchController>(); gameObject.tag = "Unit"; movementArray = new List<Vector3>(); GameObject pObj_; pObj_ = GameObject.FindWithTag("oScene0"); scene0Script = pObj_.GetComponent<JTSScene0>(); tilesArray = scene0Script.tileArray; enemyArray = scene0Script.enemyArray_debug; currentState = UnitState.CREATED; }
void LateUpdate() { if(matchController == null) { matchController = GameObject.Find("MatchControllerObj").GetComponent<MatchController>(); } if(scene0Script == null) { GameObject pObj_; pObj_ = GameObject.FindWithTag("oScene0"); scene0Script = pObj_.GetComponent<JTSScene0>(); } }
void Awake() { wasGenerated = false; _wasRender = false; _timeFindPath = 0; //s GameObject pObj_; pObj_ = GameObject.FindWithTag("oScene0"); scene0Script = pObj_.GetComponent<JTSScene0>(); movementArray = new List<Vector3>(); AStar.OnPathFinded += HandleAStarOnPathFinded; _gridTransforms = new List<List<Transform>>(); _nodeStatesGrid = new List<List<TileController>>(); _parentTransforms = new List<Transform>(); _numRows = int.Parse(_numRowsString); _numCols = int.Parse(_numColsString); _camera = Camera.main; // ROOT PARENT just for BEAUTY STRUCTURE GameObject go = new GameObject("GRID_MAP_NODES"); _parentTransform = go.transform; }
void Start() { GameObject pObj_; pObj_ = GameObject.FindWithTag("oScene0"); scene0Script = pObj_.GetComponent<JTSScene0>(); gameObject.AddComponent("InputInterface"); //gameObject.AddComponent("DragDropSurfaceTile"); UnHighlightTile(); matchController = GameObject.Find("MatchControllerObj").GetComponent<MatchController>(); isOccupied = false; }