HeadScript.attack C# (CSharp) Method

attack() public method

public attack ( ) : void
return void
    void attack()
    {
        GameObject newObj = Instantiate(fire) as GameObject;
        newObj.transform.position = new Vector3(pos.position.x, pos.position.y, pos.position.z);
        ArcFireball fireA = newObj.GetComponent<ArcFireball>();
        if (fireA != null) {
            fireA.Launch(fireSpeed);
        } else {
            CerberusFireball fireC = newObj.GetComponent<CerberusFireball>();
            fireC.speed = fireSpeed;
        }
    }