public void Execute() { var player = SystemContainer.GetSystem <Player.Player>(); if (player.HasQuest(quest)) { var playerQuest = player.data.quests.First(q => q.name == quest.name); playerQuest.SetStage(stage); } }
public void Execute() { if (giveItem) { SystemContainer.GetSystem <Player.Player>().inventory.AddItem(item.id); } else if (giveMoney) { SystemContainer.GetSystem <Player.Player>().data.money += money; } }
public Node GetNextNode() { var player = SystemContainer.GetSystem <Player.Player>(); if (player.HasQuest(quest)) { var playerQuest = player.data.quests.First(q => q.name == quest.name); return(GetOutputPort("stages " + playerQuest.progress.currentStage).Connection.node); } else { return(GetOutputPort("doesntHaveQuest").Connection.node); } }
private void Start() { data.position = transform.position; data.rotation = transform.rotation; for (int i = 0; i < startingInventory.Length; i++) { inventory.AddItem(startingInventory[i]); inventory.items[i].Equipped = true; } equipment.CheckEquipment(); player = SystemContainer.GetSystem <Player.Player>(); base.Start(); }
private void OnEnable() { if (firstRun) { firstRun = false; return; } var player = SystemContainer.GetSystem <Player.Player>(); container = player.inventory; container.onItemAdded += ItemAdded; container.onItemRemoved += ItemRemoved; moneyAmount.text = player.data.money.ToString("N0"); AddButtons(); AddAllItems(); }
protected virtual void Start() { SystemContainer.GetSystem <SaveGameManager>().Register(this); }
public void Load() { Debug.Log("Loading saved game"); Time.timeScale = 1; SystemContainer.GetSystem <SaveGameManager>().LoadSaveGame(); }
public void NewGame() { Debug.Log("Starting new game"); Time.timeScale = 1; SystemContainer.GetSystem <SaveGameManager>().LoadGame(); }
public void Save() { SystemContainer.GetSystem <SaveGameManager>().Save(); }
public void LoadMainMenu() { Time.timeScale = 1; SystemContainer.GetSystem <SaveGameManager>().LoadMainMenu(); }
private void OnDeath() { SystemContainer.GetSystem <Player.Player>().StartQuest(quest); }
public void Execute() { SystemContainer.GetSystem <Player.Player>().StartQuest(quest); }
protected override void DeathAnimationFinished() { disableMovement = false; SystemContainer.GetSystem <SaveGameManager>().LoadSaveGame(); }
private void OnEnable() { buttons = new List <Button>(); quests = SystemContainer.GetSystem <Player.Player>().data.quests; CreateQuestButtons(); }