private void OnCommandExecutionPointBodyEntered(RigidBody2D body)
    {
        if (body.GetName().Find("RightCommand") != -1)
        {
            this.EmitSignal("CallRight");
            hitByCommandSound.Play();
        }
        else if (body.GetName().Find("LeftCommand") != -1)
        {
            this.EmitSignal("CallLeft");
            hitByCommandSound.Play();
        }

        this.globals.currentCommandBuffer -= 1;
        body.QueueFree();
    }
Exemple #2
0
    public void OnCommandExecutePointBodyEntered(RigidBody2D body)
    {
        if (body.GetName().Find("TurnRightCommand") != -1)
        {
            this.EmitSignal("CallRight");
        }
        else if (body.GetName().Find("TurnLeftCommand") != -1)
        {
            this.EmitSignal("CallLeft");
        }
        else
        {
            this.EmitSignal("CallShoot");
        }

        this.globals.currentCommandBuffer -= 1;
        body.QueueFree();
    }