Exemple #1
0
    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);
        }
    }
Exemple #2
0
    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);
        }
    }
Exemple #3
0
        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());
        }
Exemple #4
0
 public override void AttachScripts(AbilitySelection abilitySelection)
 {
     throw new NotImplementedException();
 }
Exemple #5
0
 private void Start()
 {
     _selector = FindObjectOfType <AbilitySelection>();
 }
Exemple #6
0
 void Start()
 {
     setHealthText(currHP);
     abilitySelection = GameObject.Find("Pause-Map-Screens").GetComponent <AbilitySelection>();
     bubbleController = GameObject.Find("obj_player").GetComponent <BubbleController>();
 }
Exemple #7
0
 public abstract void AttachScripts(AbilitySelection abilitySelection);
Exemple #8
0
 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);
 }
Exemple #9
0
 public void SetAbilitySelection(AbilitySelection abilitySelection)
 {
     this.abilitySelection = abilitySelection;
 }
Exemple #10
0
 private void Start()
 {
     Destroy(Instantiate(_resurectparticle, this.gameObject.transform.position, this.gameObject.transform.rotation), 2f);
     _selector = FindObjectOfType <AbilitySelection>();
 }