public override void OnEndAttack() { cooledDown = false; startPos = transform.position; GameObject spellSplash = Instantiate(splashPrefab, startPos, transform.rotation); //print(splashPrefabName); FaceTargetPos(spellSplash); //SplashObject splashObjectScript = spellSplash.GetComponent<SplashObject>(); //print(spellSplash.GetComponent(splashPrefabName)as SplashObject); SplashObject splashObjectScript = spellSplash.GetComponent(splashPrefabName) as SplashObject; //print((splashObjectScript!=null)); //print(targetPos); //print(Caster); //Help.print("spleah",damage); // splashObjectScript.SetVariables(targetPos, Caster, lingeringDuration,maxDiameter, elements,damage); if (homing == null) { splashObjectScript.SetVariables(targetPos, Friends, lingeringDuration, maxDiameter, elements, damage); } else { splashObjectScript.SetVariables(homing, Friends, lingeringDuration, maxDiameter, elements, damage); } base.OnEndAttack(); }
public void Start() { _splash = GameObject.FindWithTag("Splash").GetComponent <SplashObject>(); _orca = GameObject.FindWithTag("OrcBody"); }