void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.tag == "Player") { PlayerAbilities playerAbility = GameObject.Find("obj_player").GetComponent <PlayerAbilities>(); AbilitySelection abilitySelection = GameObject.Find("Pause-Map-Screens").GetComponent <AbilitySelection>(); playerAbility.SetFlower(true); AbilitySelection.currentAbility = "flower"; abilitySelection.flowerClicked(); Destroy(gameObject); } }
void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.tag == "Player") { PlayerAbilities playerAbility = GameObject.Find("obj_player").GetComponent <PlayerAbilities>(); PlayerMovement playerMovement = GameObject.Find("obj_player").GetComponent <PlayerMovement>(); AbilitySelection abilitySelection = GameObject.Find("Pause-Map-Screens").GetComponent <AbilitySelection>(); playerMovement.speedLimit = 250; playerAbility.SetSpeed(true); AbilitySelection.currentAbility = "speed"; abilitySelection.speedClicked(); Destroy(gameObject); } }
public override void AttachScripts(AbilitySelection abilitySelection) { List <ActorAction> actionsToQueue = new List <ActorAction>(); // Create each action actionsToQueue.Add(StepForward.CreateComponent(this.actingCombatant.gameObject, new UnityEngine.Vector3(-0.5f, 0.0f, 0.0f))); actionsToQueue.Add(Actions.Attacks.AttackMelee.CreateComponent(this.actingCombatant.gameObject, abilitySelection.targets)); actionsToQueue.Add(StepForward.CreateComponent(this.actingCombatant.gameObject, new UnityEngine.Vector3(0.0f, 0.0f, 0.0f))); actionsToQueue.Add(this.actingCombatant.gameObject.AddComponent <TurnFinished>()); foreach (ActorAction combatAction in actionsToQueue) { // Each action has a reference to its source ability. combatAction.SetAbilitySelection(abilitySelection); } this.actingCombatant.Actions.SetActions(actionsToQueue.ToArray()); }
public override void AttachScripts(AbilitySelection abilitySelection) { throw new NotImplementedException(); }
private void Start() { _selector = FindObjectOfType <AbilitySelection>(); }
void Start() { setHealthText(currHP); abilitySelection = GameObject.Find("Pause-Map-Screens").GetComponent <AbilitySelection>(); bubbleController = GameObject.Find("obj_player").GetComponent <BubbleController>(); }
public abstract void AttachScripts(AbilitySelection abilitySelection);
public AbilitySelectionList() { XamlReader.Load(this); AbilitySelection.BindDataContext(c => c.DataStore, (DictionaryVM <Guid, string> m) => m.DisplayList); AbilitySelection.SelectedIndexBinding.BindDataContext((DictionaryVM <Guid, string> m) => m.SelectedIndex); }
public void SetAbilitySelection(AbilitySelection abilitySelection) { this.abilitySelection = abilitySelection; }
private void Start() { Destroy(Instantiate(_resurectparticle, this.gameObject.transform.position, this.gameObject.transform.rotation), 2f); _selector = FindObjectOfType <AbilitySelection>(); }