Ejemplo n.º 1
0
    void OnTriggerEnter(Collider other)
    {
        AbilityEntityShell abilityES = other.GetComponentInParent <AbilityEntityShell> ();

        if (abilityES != null && abilityES.abilityEntity.targetCard == _battleCard)
        {
            _battleCard.cardEffected(abilityES);
        }
    }
Ejemplo n.º 2
0
    IEnumerator CastAbilityAfter(Ability ability, BattleCard target, float time)
    {
//		Debug.Log(10);
        _battleController.shieldPanel.Activate();
//		Debug.Log("ya");
        yield return(new WaitForSeconds(time));

        AbilityEntityShell prefab             = Resources.Load <AbilityEntityShell> (ResourcesFolderPath.prefabs_ability + "/" + ability.name);
        AbilityEntityShell abilityEntityShell = Instantiate(prefab) as AbilityEntityShell;

//		Debug.Log(abilityEntityShell.name);
        abilityEntityShell.Init(ability.abilityCast(ability, _battleCard, target));
        _battleController.shieldPanel.Deactivate();
//		Debug.Log("ha");
        yield return(null);
    }