public void SelectMarine(GameObject marine, PlayerHeroVarsCS marineData) { GameObject mgr = GameObject.Find("Manager Scripts"); TouchManagerCS touch = mgr.GetComponent<TouchManagerCS>(); marineData.Selected=true; touch.lastGameObj = marine; touch.SetActiveCamera(marineData.unitCamera); marineData.gameObject.GetComponent<ThirdPersonMMOCamera>().Reset(); unselectAllMarines(marine); GetComponentInChildren<GUIManager>().StatusMessageText = ""; touch.showValidMoves(marine, marineData); }
/** * Show moves that are only valid in the **/ public void showValidMoves(GameObject mob, PlayerHeroVarsCS mobData) { GameObject tiles = GameObject.Find("Tiles"); tiles.GetComponent<TilesManager>().showValidMoves(mob, mobData); }
/** * show on the gameboard all valid moves for the selected unit **/ public void showValidMoves(GameObject mob, PlayerHeroVarsCS mobData) { currentTile = 0; if(mobData.currentMoves < 1) return; selectedUnit = mob; selectedUnitData = mobData; CheckTile(currentTile); }