public override void Init(GameObject vendingwindow, GameObject envObj) { BaseInit(vendingwindow, envObj); accaunt = Global.Component.GetAccauntController(); actionWindow = Global.Component.GetActionWindowController(); dropdown.onValueChanged.AddListener(OnDDValueChange); dropdown.onValueChanged.Invoke(dropdown.value); }
public bool Craft_Table(RaycastHit2D[] hits, Item tool, CraftType craftType, CraftTable craftTable) { GameObject GameObjOnTable = GetGameObjOnTable(hits); if (GameObjOnTable == null) { Debug.Log("TableIsEmpty"); return(false); } Item itemOnTabe = GameObjOnTable.GetComponent <ItemCell>().item; ItemCraftData recept = FindRecept(tool, itemOnTabe, craftType, craftTable); if (recept == null) { Debug.Log("no recept"); return(false); } if (!IsSuitableMinLvl(recept)) { Debug.Log("recept lvl bigger then skill lvl"); return(false); } Item craftResult = recept.recept.craftResult; // для вызова actionWindow if (itemOnTabe.itemOptionData.actionWindowTag != string.Empty) { Item _itemOnTabe = Instantiate(itemOnTabe); Item _craftResult = Instantiate(craftResult); ActionWindowController actionWindow = Global.Component.GetActionWindowController(); actionWindow.OpenActionWindow(itemOnTabe.itemOptionData.actionWindowTag); actionWindow.InitActioWindow(itemOnTabe.itemOptionData.actionWindowTag, GameObjOnTable, _itemOnTabe, _craftResult); //UpdateGameObjItem(GameObjOnTable, craftResult); return(recept.removeTool); } UpdateGameObjItem(GameObjOnTable, craftResult); AddExpReward(recept); return(recept.removeTool); }
void Awake() { actionWindow = Global.Component.GetActionWindowController(); dialogWindow = Global.Component.GetDialogueManager(); //spriteRenderer = GetComponent<SpriteRenderer>(); rigidBody = GetComponent <Rigidbody2D>(); //skin = skinGo.GetComponent<SpriteRenderer>(); //skin_base = skin_baseGo.GetComponent<SpriteRenderer>(); //hair = hairGo.GetComponent<SpriteRenderer>(); }
public List <string> GetActionStatus(string[] param) { ActionWindowController actionWindow = Global.Component.GetActionWindowController(); TerminalController terminalController = Global.Component.GetTerminalController(); terminalController.GetCurrentPc().Close(); actionWindow.CloseActionWindow("awpc"); return(new List <string>() { "exit status 0" }); }
//Vector2 vendorPosition; //Transform player = null; //float actioPlayerRadius = 0; public void Init(GameObject vendingwindow, GameObject envObj) { BaseInit(vendingwindow, envObj); //controller = Global.Component.GetController(); accaunt = Global.Component.GetAccauntController(); actionWindow = Global.Component.GetActionWindowController(); //this.vendingwindow = vendingwindow; dropdown.onValueChanged.AddListener(OnDDValueChange); dropdown.onValueChanged.Invoke(dropdown.value); //vendorPosition = envObj.transform.position; // player = controller.player; //actioPlayerRadius = controller.GetActioPlayerRadius(); }
private void Awake() { //upper_2 = Global.TileMaps.GetTileMap(Global.TileMaps.BASE_3); //upper = Global.TileMaps.GetTileMap(Global.TileMaps.BASE_2); //upper_2 = Global.TileMaps.GetTileMap(Global.TileMaps.UPPER_2); upper = Global.TileMaps.GetTileMap(Global.TileMaps.UPPER); baseTiles.Init(); upper.SetTile(upper.WorldToCell(transform.position), baseTiles.GetMainTile()); actionWindow = Global.Component.GetActionWindowController(); terminalController = Global.Component.GetTerminalController(); eventController = Global.Component.GetEventController(); // USER MODE FOR TESTING currentMemory = memoryContents.Where(i => i.userMode == CommandDB.UserMode.User).FirstOrDefault(); InitAllDocs(); }
void Start() { instance = this; //DontDestroyOnLoad(transform.gameObject); // еслт какое-то окно активно, запретить управление actionWindow = Global.Component.GetActionWindowController(); dialogWindow = Global.Component.GetDialogueManager(); InitCells(); InitItemInInventory(); currentHand = left_hand_btn; SetHandColor(); // отресовка всех одетых вещей UpdateAllEqupment(); SetBagCellList(); SetSellList(); SetInvCellList(); }
public void Craft_Hands(GameObject itemInHand, GameObject toolGO) { Item tool = toolGO.GetComponent <ItemCell>().item; Item item = itemInHand.GetComponent <ItemCell>().item; // если активная рука пустая и айтес имеет функционал для открытия окна if (item.itemOptionData.actionWindowTag != string.Empty && controller.IsEmpty(toolGO.GetComponent <Button>())) { string tagWithPrefix = item.itemOptionData.actionWindowTag + "Hand"; ActionWindowController actionWindow = Global.Component.GetActionWindowController(); actionWindow.OpenActionWindow(tagWithPrefix); actionWindow.InitActioWindow(tagWithPrefix, null, item, null); } ItemCraftData recept = FindRecept(tool, item, CraftType.Cooking, CraftTable.Hands); if (recept == null) { Debug.Log("no recept"); return; } if (!IsSuitableMinLvl(recept)) { Debug.Log("recept lvl bigger then skill lvl"); return; } Item craftResult = Instantiate(recept.recept.craftResult); // для передачи таков между айтемами (оригинальным и результатом) if (item.itemTimeflowModify.ticsTransition == true) { craftResult.itemTimeflowModify.tics = item.itemTimeflowModify.tics; } craftResult.itemEffect.currentCell = itemInHand.GetComponent <Button>(); itemInHand.GetComponent <ItemCell>().item = craftResult; itemInHand.GetComponent <Image>().sprite = craftResult.itemSprite; }
private void TestDialogBtn(object sender, EventArgs e) // Тестовый диалог (нужно удалить) { ActionWindowController.TestDialogBtn(); }
void Awake() { actionWindow = Global.Component.GetActionWindowController(); dialogWindow = Global.Component.GetDialogueManager(); //rb = GetComponent<Rigidbody2D>(); }
//**// //**ОСНОВНЫЕ МЕТОДЫ ФОРМЫ**// public void ShowWindow() // Метод показа окна { ActionWindowController.ShowWindow(); }
//**БЛОК ОБНОВЛЕНИЯ ФОРМЫ**// private void InitializeForm(object sender, EventArgs e) { ActionWindowController.InitializeForm(); }
private void BackBtn(object sender, EventArgs e) // Кнопка "Назад" { ActionWindowController.BackBtn(); }
//**// //**ПЯТЁРОЧКА**// private void TradeBtn(object sender, EventArgs e) // Торговля { ActionWindowController.TradeBtn(); }
private void LootTrashCanBigBtn(object sender, EventArgs e) // Лутание мусорных баков { ActionWindowController.LootTrashCanBigBtn(); }
//**// //**ИНТЕРАКТИВНЫЕ ЭЛЕМЕНТЫ ФОРМЫ**// //**КНОПКИ ДЕЙСТВИЙ В ЛОКАЦИИ**// //**СПАЛЬНЫЙ РАЙОН**// private void HuntBirdBtn(object sender, EventArgs e) // Охота на голубей { ActionWindowController.HuntBirdBtn(); }
private void ClosedForm(object sender, FormClosedEventArgs e) // Закрытие формы { ActionWindowController.ClosedForm(); }
void Awake() { actionWindow = Global.Component.GetActionWindowController(); }
private void TestFightBtn(object sender, EventArgs e) { ActionWindowController.TestFightBtn(); }