private void LoadCallbacek(int arg1, UI_Choice arg2) { GameManager.LoadLevel("Game"); GameManager.AVGStart(GameManager.Save.File[arg1]); UseDone(); arg2.UseDone(); }
void Start() { UI_Choice.CreateUIChoice(new string[] { "+1 Damage", "+1 Move Range", "+1 Rest" }, Choice); }
private void SaveCallbacek(int arg1, UI_Choice arg2) { GameManager.Save.File[arg1] = Libretto.CurrentNode.ID; arg2.UseDone(); UIManager.GetUI<UI_Game>().SetFront(); if (Libretto.CurrentNode.Type == NodeType.Option) { Play(Libretto.CurrentNode); } }
// Contient l'ensemble des fonctions MonoBehavior (Awake) #region MonoBehavior void Awake() { UI_Choice uiChoice = GameObject.FindWithTag("UI_Manager").GetComponent <UI_Choice>(); if (objectName == null) { objectName = this.name; } switch (myType) { case Type.Door: { doorScript = GetComponent <OpeningClosingDoor>(); contactSensor = GetComponent <DDContactSensor> (); myState = initialState; break; } case Type.Drawer: { drawerScript = GetComponentInParent <OpeningClosingDrawer>(); contactSensor = GetComponent <DDContactSensor> (); myState = initialState; break; } case Type.Electronic: { electronicScript = GetComponent <ElectronicDevice>(); myState = initialState; break; } case Type.Light: { electronicScript = GetComponent <ElectronicDevice>(); myState = initialState; break; } case Type.PickUp: { characterTransform = GameObject.FindWithTag("Player").GetComponent <Transform>(); rb = GetComponent <Rigidbody>(); myState = initialState; break; } } }
public void Load() { UI_Choice ch = UIManager.GetUI<UI_Choice>(); UI_Choice_Context con = new UI_Choice_Context(); con.OptionList = new List<iLabel>(); for (int i = 0; i < GameManager.Save.File.Length; i++) { con.OptionList.Add(new Label() { ID = i, Name = @"["+Writing.Get(100027) + (i + 1) + "]:" + Writing.Get(Libretto.GetNode(GameManager.Save.File[i]).Sentences.First().Value.DialogueID), }); } con.Callback = this.LoadCallbacek; ch.Use(con); ch.SetFront(); }
private void PlayNodeTypeOption(iNode _node) { UIManager.GetUI<UI_Game>().NoNext = true; UI_Choice _c = UIManager.GetUI<UI_Choice>(); _c.SetFront(); UI_Choice_Context con = new UI_Choice_Context(); con.OptionList = new List<iLabel>(); foreach (var item in _node.Sentences) { Label l = new Label() { ID = item.Key, Name = Writing.Get(item.Value.DialogueID) }; con.OptionList.Add(l); } con.Callback = (res, uichoice) => { GameManager.Save.ChoiceResult[_node.ID] = res; uichoice.UseDone(); Libretto.NextNode(); }; _c.Use(con); }
private void LoadCallbacek(int arg1, UI_Choice arg2) { arg2.UseDone(); UIManager.GetUI<UI_Game>().SetFront(); Libretto.PlayNode(GameManager.Save.File[arg1]); }