private ContractGameObject getContractGameObject(CampContract campContract) { GameObject contractInstance = GameObject.Instantiate(contractPrefab, new Vector3(0, 0, 0), Quaternion.identity); ContractGameObject contractGameObject = contractInstance.GetComponent <ContractGameObject>(); contractGameObject.initialize(contractInstance, campContract); return(contractGameObject); }
public void OnPointerClick(PointerEventData pointerEventData) { ContractGameObject contractGameObject = GameData.getInstance().currContractGameObject; if (contractGameObject != null) { contractGameObject.unSelectContract(); } selectContract(); GameData.getInstance().currContractGameObject = this; }
public void confirmCampEvents() { ContractGameObject currContract = GameData.getInstance().currContractGameObject; if (currContract == null) { Debug.Log("no currContract selected. returning and doing nothing."); return; } campService.discardCampCards(); startFight(); }
public void startFight() { GameData gameData = GameData.getInstance(); ContractGameObject currContract = gameData.currContractGameObject; if (gameData.currContractGameObject == null) { sceneUiManager.showCampScene(); campService.enterCamp(); } else { CampEncounter campEncounter = currContract.campContract.encounters[gameData.fightData.encounterCount]; if (campEncounter == CampEncounter.campFire || campEncounter == CampEncounter.campEvent) { sceneUiManager.showCampScene(); sceneUiManager.showEventScene(); EventTypes eventTypes = new EventTypes(eventManagerService, playerService); Event gameEvent = eventManagerService.getEvent(campEncounter); eventManagerService.showEvent(gameEvent); } else { Fight fight = enemyManagerService.getFight(campEncounter); gameData.fightData.currentFight = fight; enemyManagerService.initializeEnemiesForFight(fight); playerService.startFight(); deckService.startFight(); upgradeService.triggerCombatStartActions(); sceneUiManager.startFight(); } gameData.fightData.encounterCount++; gameData.fightData.turnCount = 0; if (gameData.fightData.encounterCount == gameData.fightData.totalEncounterCount) { gameData.fightData.encounterCount = 0; gameData.currContractGameObject = null; } } }
public void showCampContract(CampContract campContract) { ContractGameObject contractInstance = getContractGameObject(campContract); contractInstance.transform.SetParent(campContracts.transform, false); }