Esempio n. 1
0
    public void Impact(Vector2 impactDir)
    {
        Vector3      pos   = transform.position + (Vector3)impactDir.normalized * radius * 0.92f + new Vector3(0, 0, -2);
        ShieldImpact clone = Instantiate(impact, pos, Quaternion.LookRotation(transform.forward, impactDir)) as ShieldImpact;

        Destroy(clone, 5f);
        Debug.DrawLine(transform.position, pos);
    }
Esempio n. 2
0
File: Wings.cs Progetto: lwsn/SPACE
    public void Impact(Vector2 impactDir, Destructables target)
    {
        ShieldImpact clone = Instantiate(impact, parent.transform.position + new Vector3(0, 0, -2), Quaternion.LookRotation(transform.forward, impactDir)) as ShieldImpact;

        clone.transform.parent = parent.transform;
    }