private void Start() { progData = GameObject.Find("Data/ClientData").GetComponent <ProgressData>(); pc = playerPanel.GetComponent <OWPlayerController>(); pfd = GameObject.Find("GlobalGameManager/PlayFabController/PlayFabDataController").GetComponent <PlayFabData>(); levelCount = GameObject.Find("LevelDesign/Levels").transform.childCount; ToggleUI(false); }
//Start // Use this for initialization void Start() { gameState = GameState.Overworld; randomEcountersOn = true;//Depending on the area. Maybe a scene database indicating whether true or false?. //Initialization of Objects cam_T = GameObject.FindGameObjectWithTag("CamTarget").GetComponent <Transform>(); playerController = GameObject.FindGameObjectWithTag("Player").GetComponent <OWPlayerController>(); battleUI = GameObject.FindGameObjectWithTag("UI").GetComponent <BattleUI>(); soundPlayer = gameObject.GetComponent <SoundPlayer>(); tileScript = GameObject.FindGameObjectWithTag("TileManager").GetComponent <TileScript>(); tileScript.Init(); battlefield = GameObject.FindGameObjectWithTag("Battlefield").GetComponent <Transform>(); //Databases. charStats = GetComponent <CharacterStats>(); attackInfo = GetComponent <AttackInfoManager>(); //General Info //Placeholder Character Creation charStats.CreateCharacterStats("Player", 0, 1, 10, 12, 5, 3, 2, 4); //PLACHEOLDER; charStats.SetTileOccupied("Player", 0, new Vector2(3, 4), tileScript.yTiles); charStats.CreateCharacterStats("Enemy", 0, 4, 70, 12, 5, 3, 2, 4); //PLACHEOLDER; charStats.SetTileOccupied("Enemy", 0, new Vector2(2, 2), tileScript.yTiles); //Create a cursor for Formation Movement GameObject objCursor; objCursor = Instantiate(cursor); selectedTileIndicator = objCursor.GetComponent <Transform>(); selectedTileIndicator.gameObject.SetActive(false); //For Movement Limit calculations tileVectorSize.x = tileScript.xTiles; tileVectorSize.y = tileScript.yTiles; tileAmount = tileScript.tileAmount - 1; selectionLimit[0] = new Vector2(tileVectorSize.x / 2, 0); selectionLimit[1] = new Vector2(tileVectorSize.x, tileVectorSize.y); selectionLimit[2] = new Vector2(0, 0); selectionLimit[3] = new Vector2(tileVectorSize.x / 2, tileVectorSize.y); //MoveFormation(0, charControl[0].tile); //PLACEHOLDER battleUI.Init(); }
void Start() { playerController = GameObject.FindGameObjectWithTag("Player").GetComponent <OWPlayerController>(); battleUI = GameObject.FindGameObjectWithTag("UI").GetComponent <BattleUI>(); gameManager = GetComponent <GameManager>(); }
private void Start() { // TODO: Get the GameObjects of the skins and get the available image. owpc = GameObject.Find("UICanvas1/PlayerPanel").GetComponent <OWPlayerController>(); owsc = GameObject.Find("Data/ClientData").GetComponent <OWSkinController>(); }