public override void ForceEndConversation(UI_PlayerBase activator) { // end the healing bIsResting = false; restTarget = null; base.ForceEndConversation(activator); }
public void RestPlayer(UI_PlayerBase activator) { Player player = activator.GetOwner(); if(player != null) { bIsResting = true; restTarget = player; } }
protected override void InitializeActor() { base.InitializeActor(); bCanPickupItems = true; bItemsCauseEffects = true; bCanModifyVisibilty = true; if (cameraPrototype == null) { Debug.Log("ERROR! Player actor " + name + " has no camera prototype!"); return; } myCamera = (PlayerCamera)GameObject.Instantiate(cameraPrototype, transform.position + new Vector3(0.0f, 0.0f, -10.0f), transform.rotation); if (myCamera != null) { myCamera.InitailizeCamera(this); } else { Debug.Log("ERROR! Player actor " + name + " failed to initialize its camera because it couldn'y instantiate it!"); } ui = GetComponent <UI_PlayerBase>(); if (ui == null) { Debug.Log("WARNING! Player actor " + name + " doesn't have any UI component!"); } // Tries to find a UI menu to use as the players inventory menu inventoryMenu = GameObject.FindObjectOfType <UI_InventoryMenu>(); if (inventoryMenu == null) { Debug.Log("WARNING! Player actor " + name + " could not find a UI_InventoryMenu in the scene!"); } else { inventoryMenu.gameObject.SetActive(false); } // HACK: temporarily adding some abilities. haven't decided how this will actually work yet abilities.Add(new Ability_HunterAttack()); // Main attack ability in first place abilities.Add(new Ability_Invisibility()); abilities.Add(new Ability_PlaceTrap()); abilities.Add(new Ability_TossBomb()); abilities.Add(new Ability_Slash()); // Player always has the cap fire ability abilities.Add(new Ability_CreateFirePit()); //// TEMP: give the player some stuff in their inventory and try equipping the sword //inventory.Add(new Sword()); //inventory.Add(new Bow()); //EquipWeapon((Weapon)inventory[0]); ui.InitializeUI(); }
public virtual void Init(UI_PlayerBase creator, string title, UI_Menu instigator = null) { options = new List <MenuButton>(); UI_base = creator; panelName = title; this.instigator = instigator; childClosedHandler = ChildMenuClosed; }
public void RestPlayer(UI_PlayerBase activator) { Player player = activator.GetOwner(); if (player != null) { bIsResting = true; restTarget = player; } }
public override void Init(UI_PlayerBase creator, string title, UI_Menu instigator = null) { base.Init(creator, title, instigator); float w = 700.0f; float h = 400.0f; buttonWidth = 350.0f; panel = new Rect(Screen.width / 2.0f - w / 2.0f, Screen.height / 2.0f - h / 2.0f, w, h); }
public override void Init(UI_PlayerBase creator, string title, UI_Menu instigator = null) { base.Init(creator, title, instigator); float w = 700.0f; float h = 400.0f; buttonWidth = 150.0f; panel = new Rect(Screen.width / 2.0f - w / 2.0f, Screen.height / 2.0f - h / 2.0f, w, h); }
//[SerializeField] //private UI_DietyMenu dietySelectionMenu; public virtual void Init(UI_PlayerBase creator) { base.Init(creator, "Make a Sacrifice:"); float w = 500.0f; float h = 400.0f; panel = new Rect(Screen.width / 2.0f - w / 2.0f, Screen.height / 2.0f - h / 2.0f, w, h); childMenu = new UI_DietyMenu(); childMenu.panelBackground = panelBackground; childMenu.Init(creator, "Select which Diety to sacrifice to", this); }
// Interaction Handlers ------------------------------- public virtual void ForceEndConversation(UI_PlayerBase activator) { playerRef.EndCurrentExchange(); }
public virtual void Init(UI_PlayerBase creator, string title, UI_Menu instigator = null) { options = new List<MenuButton>(); UI_base = creator; panelName = title; this.instigator = instigator; childClosedHandler = ChildMenuClosed; }
// Interaction handlers ------------------------ public void LearnAboutGods(UI_PlayerBase activator) { // present the names of the gods }
// Interaction handlers ------------------------ public void TradeForMonsterBait(UI_PlayerBase activator) { activator.OpenTradeMenuFor(this); }
protected override void InitializeActor() { base.InitializeActor(); bCanPickupItems = true; bItemsCauseEffects = true; bCanModifyVisibilty = true; if(cameraPrototype == null) { Debug.Log("ERROR! Player actor "+name+" has no camera prototype!"); return; } myCamera = (PlayerCamera)GameObject.Instantiate(cameraPrototype, transform.position + new Vector3(0.0f, 0.0f, -10.0f), transform.rotation); if(myCamera != null) { myCamera.InitailizeCamera(this); } else { Debug.Log("ERROR! Player actor "+name+" failed to initialize its camera because it couldn'y instantiate it!"); } ui = GetComponent<UI_PlayerBase>(); if(ui == null) { Debug.Log("WARNING! Player actor " + name + " doesn't have any UI component!"); } // Tries to find a UI menu to use as the players inventory menu inventoryMenu = GameObject.FindObjectOfType<UI_InventoryMenu>(); if(inventoryMenu == null) { Debug.Log("WARNING! Player actor " + name + " could not find a UI_InventoryMenu in the scene!"); } else { inventoryMenu.gameObject.SetActive(false); } // HACK: temporarily adding some abilities. haven't decided how this will actually work yet abilities.Add(new Ability_HunterAttack()); // Main attack ability in first place abilities.Add(new Ability_Invisibility()); abilities.Add(new Ability_PlaceTrap()); abilities.Add(new Ability_TossBomb()); abilities.Add(new Ability_Slash()); // Player always has the cap fire ability abilities.Add(new Ability_CreateFirePit()); //// TEMP: give the player some stuff in their inventory and try equipping the sword //inventory.Add(new Sword()); //inventory.Add(new Bow()); //EquipWeapon((Weapon)inventory[0]); ui.InitializeUI(); }
// Start the interaction with the owner public void BeginInteraction(UI_PlayerBase activator) { activator.sacrificeMenu.OpenMenu(); }