Exemplo n.º 1
0
    void Shoot(ONEGeneral.Direction p_direction, GameObject p_projectileSpawn)
    {
        if (p_projectileSpawn == null)
        {
            return;
        }

        GameObject created = Instantiate(p_projectileSpawn, transform.parent);

        created.transform.localPosition = m_destination;
        ProjectileSpawn script = created.GetComponent <ProjectileSpawn>();

        Debug.Assert(script != null);
        script.Direction = p_direction;
        script.PlayMyTurn();

        ONESoundDesign.EnemyShoot();
    }