Exemplo n.º 1
0
    public void SendSignal(SoundProjector.ProjectorType type, float arc, Vector2 direction)
    {
        float angle = SoundProjector.GetFullAngle(direction);

        GameObject temp = new GameObject();

        temp.transform.position = this.transform.position;
        //temp.transform.rotation = this.transform.rotation;

        SoundProjector proj = temp.AddComponent <SoundProjector>();

        proj.Project(type, angle, arc);
    }
Exemplo n.º 2
0
    // Update is called once per frame
    void Update()
    {
        bool project = Input.GetKeyUp(KeyCode.K);

        if (project)
        {
            GameObject temp = new GameObject();

            temp.transform.position = this.transform.position;
            temp.transform.rotation = this.transform.rotation;

            SoundProjector proj = temp.AddComponent <SoundProjector>();
            proj.Project();
        }
    }