private void Start() { generation = GameObject.Find("GameManager").GetComponent <Generation>(); saveGame = GameObject.Find("GameManager").GetComponent <SaveGame>(); panels = gameObject.GetComponent <UIPanels>(); showStats = false; }
// Start is called before the first frame update void Start() { panels = GameObject.Find("Canvas").GetComponent <UIPanels>(); panels.finishPanel.SetActive(false); hasFinished = false; alreadyCalled = false; }
//shows the requested panel public void ShowPanel(UIPanels panel) { switch (panel) { case UIPanels.UIInventoryMenu: if (!UIBuyScreen.active) { UIInventoryMenu.SetActive(true); UIInventoryMenu.GetComponent <InventoryPanel>().PopulateInventory(); } break; case UIPanels.UIBuyScreen: UIBuyScreen.SetActive(true); break; case UIPanels.UISellScreen: UISellScreen.SetActive(true); break; case UIPanels.UIEquipScreen: EquipScreen.SetActive(true); break; } }
public void Init(UIPanels uiPanels, Player player) { tradingPlayer = player; OnPlayerMoneyChanged(GameplayController.instance.session.localPlayer.GetName()); OnPlayerMoneyChanged(tradingPlayer.GetName()); FillSender(player); }
public void Init(Player player, UIPanels UIPanels) { this.player = player; this.UIPanels = UIPanels; nickName.text = player.GetName(); money.text = player.Money.ToString(); nickName.color = money.color = player.MainColor; GameplayController gC = GameplayController.instance; showBuildingsButton.SetActive(!player.NetworkPlayer.IsLocal); tradeButton.SetActive(!player.NetworkPlayer.IsLocal && gC.session.FindPlayer(gC.board.dice.currentPlayer).NetworkPlayer.IsLocal); }
public void PreInit(UIPanels controller) { myListings = new List <TradeListing>(); theirListings = new List <TradeListing>(); myPool = new BasePool(myContent, template, Keys.Menu.MAX_PLAYERS_COUNT); theirPool = new BasePool(theirContent, template, Keys.Menu.MAX_PLAYERS_COUNT); myPool.Init(); theirPool.Init(); uIPanels = controller; gC = GameplayController.instance; lC = SettingsController.instance.languageController; }
//OnStateEnter is called when a transition starts and the state machine starts to evaluate this state override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { if (player == null) { player = animator.gameObject.GetComponent <Player>(); } animator.SetBool("running", false); animator.SetBool("climbing", false); animator.SetFloat("yVelocity", 0); GameObject.Find("GameManager").GetComponent <SaveGame>().MissionFailed(); PlayerPrefs.SetInt("totalMissionsFailed", (PlayerPrefs.GetInt("totalMissionsFailed") + 1)); panels = GameObject.Find("Canvas").GetComponent <UIPanels>(); panels.deathPanel.SetActive(true); Time.timeScale = 0; }
//Hides the requested panel public void HidePanel(UIPanels panel) { switch (panel) { case UIPanels.UIInventoryMenu: UIInventoryMenu.SetActive(false); break; case UIPanels.UIBuyScreen: UIBuyScreen.SetActive(false); break; case UIPanels.UISellScreen: UISellScreen.SetActive(false); break; case UIPanels.UIEquipScreen: EquipScreen.SetActive(false); break; } }
public void Init(Field field, UIPanels UIPanels, bool trade = false) { this.UIPanels = UIPanels; this.field = field; fieldName.text = field.GetFieldName(); icon.sprite = field.FieldImage; gc = GameplayController.instance; showOnBoardButton.SetActive(!trade); addToTradeButton.SetActive(trade); if (trade) { if (UIPanels.rightPanel.myListings.Find(listing => listing.tradeField == field) == null && UIPanels.rightPanel.theirListings.Find(listing => listing.tradeField == field) == null) { tradeToggle.isOn = false; } else { tradeToggle.isOn = true; } } }
private void Construct(UIPanels uiPanels) { _uiPanels = uiPanels; }
private void Awake() { Instance = this; }
void Awake() { mInstance = this; }
public void PreInit(UIPanels controller) { uIPanels = controller; }
public void PreInit(UIPanels controller) { gC = GameplayController.instance; uIPanels = controller; }
// Start is called before the first frame update void Start() { panels = GameObject.Find("Canvas").GetComponent <UIPanels>(); paused = false; }