示例#1
0
    public override bool Cast(ISpellParams parameters)
    {
        SpellTargetParams projectileParameters = (SpellTargetParams)parameters;

        Instantiate(gameObject, projectileParameters.source + Vector3.back * .6F, gameObject.transform.rotation, Mage.instance.spellAnchor).GetComponent <SpellProjectile>().target = projectileParameters.destination;

        return(true);
    }
示例#2
0
    public override bool Cast(ISpellParams parameters)
    {
        SpellTargetParams targetParams = (SpellTargetParams)parameters;

        Transform t = Instantiate(gameObject).transform;

        t.GetComponent <SpellAttach>().target = targetParams.destination;

        if (immobilizeEnemy)
        {
            IEnemy enemy = targetParams.destination.GetComponent <IEnemy>();
            if (enemy != null)
            {
                enemy.AddImmobilizedAgent(t);
            }
        }

        return(true);
    }