private void Start() { player = GetComponent <PlayerStuff>(); hud = GameObject.Find("HUD").GetComponentInChildren <hudChange>(); dia = hud.GetComponentInChildren <DialogCentre>(true); if (cardMenu == null) { cardMenu = hud.GetComponentInChildren <CardMenu>(); } }
public static void Refresh() { #if UNITY_EDITOR CardMenu.UpdateInspector(); #endif }
private static void OpenWindow() { CardMenu window = GetWindow <CardMenu>(); window.position = GUIHelper.GetEditorWindowRect().AlignCenter(700, 700); }
// Use this for initialization void Start() { gameplay = this; _MainCamera = (Camera)gameObject.GetComponent("Camera"); _SelectionListWindow = new SelectionListWindow(Screen.width / 2, Screen.height / 2 + 100); _AbilityManagerList = new SelectionListGenericWindow(Screen.width / 2, Screen.height / 2 + 100); _SelectionCardNameWindow = new SelectionCardNameWindow(Screen.width / 2 - 50, Screen.height / 2); _SelectionCardNameWindow.CreateCardList(); _SelectionCardNameWindow.SetGame(this); _DecisionWindow = new DecisionWindow(Screen.width / 2, Screen.height / 2 + 100); _DecisionWindow.SetGame(this); _NotificationWindow = new NotificacionWindow(Screen.width / 2, Screen.height / 2 + 100); _NotificationWindow.SetGame(this); FromHandToBindList = new List<Card>(); AttackedList = new List<Card>(); UnitsCalled = new List<Card>(); EnemySoulBlastQueue = new List<Card>(); _PopupNumber = new PopupNumber(); _MouseHelper = new MouseHelper(this); GameChat = new Chat(); opponent = PlayerVariables.opponent; playerHand = new PlayerHand(); enemyHand = new EnemyHand(); field = new Field(this); enemyField = new EnemyField(this); guardZone = new GuardZone(); guardZone.SetField(field); guardZone.SetEnemyField(enemyField); guardZone.SetGame(this); fieldInfo = new FieldInformation(); EnemyFieldInfo = new EnemyFieldInformation(); Data = new CardDataBase(); List<CardInformation> tmpList = Data.GetAllCards(); for(int i = 0; i < tmpList.Count; i++) { _SelectionCardNameWindow.AddNewNameToTheList(tmpList[i]); } //camera = (CameraPosition)GameObject.FindGameObjectWithTag("MainCamera").GetComponent("CameraPosition"); //camera.SetLocation(CameraLocation.Hand); LoadPlayerDeck(); LoadEnemyDeck(); gamePhase = GamePhase.CHOOSE_VANGUARD; bDrawing = true; bIsCardSelectedFromHand = false; bPlayerTurn = false; bDriveAnimation = false; bChooseTriggerEffects = false; DriveCard = null; //Texture showed above a card when this is selected for an action (An attack, for instance) CardSelector = GameObject.FindGameObjectWithTag("CardSelector"); _CardMenuHelper = (CardHelpMenu)GameObject.FindGameObjectWithTag("CardMenuHelper").GetComponent("CardHelpMenu"); _GameHelper = (GameHelper)GameObject.FindGameObjectWithTag("GameHelper").GetComponent("GameHelper"); bPlayerTurn = PlayerVariables.bFirstTurn; //ActivePopUpQuestion(playerDeck.DrawCard()); _CardMenu = new CardMenu(this); _AbilityManager = new AbilityManager(this); _AbilityManagerExt = new AbilityManagerExt(); _GameHelper.SetChat(GameChat); _GameHelper.SetGame(this); EnemyTurnStackedCards = new List<Card>(); dummyUnitObject = new UnitObject(); dummyUnitObject.SetGame(this); stateDynamicText = new DynamicText(); }